Tabnine Logo
FSQueueMetrics.getAllocatedResources
Code IndexAdd Tabnine to your IDE (free)

How to use
getAllocatedResources
method
in
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSQueueMetrics

Best Java code snippets using org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSQueueMetrics.getAllocatedResources (Showing top 6 results out of 315)

origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager

/**
 * Subqueue metrics might be a little out of date because fair shares are
 * recalculated at the update interval, but the root queue metrics needs to
 * be updated synchronously with allocations and completions so that cluster
 * metrics will be consistent.
 */
private void updateRootQueueMetrics() {
 rootMetrics.setAvailableResourcesToQueue(
   Resources.subtract(
     clusterResource, rootMetrics.getAllocatedResources()));
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

/**
 * Subqueue metrics might be a little out of date because fair shares are
 * recalculated at the update interval, but the root queue metrics needs to
 * be updated synchronously with allocations and completions so that cluster
 * metrics will be consistent.
 */
private void updateRootQueueMetrics() {
 rootMetrics.setAvailableResourcesToQueue(
   Resources.subtract(
     clusterResource, rootMetrics.getAllocatedResources()));
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

/**
 * Subqueue metrics might be a little out of date because fair shares are
 * recalculated at the update interval, but the root queue metrics needs to
 * be updated synchronously with allocations and completions so that cluster
 * metrics will be consistent.
 */
private void updateRootQueueMetrics() {
 rootMetrics.setAvailableResourcesToQueue(
   Resources.subtract(
     getClusterResource(), rootMetrics.getAllocatedResources()));
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

/**
 * Dump scheduler state including states of all queues.
 */
private void dumpSchedulerState() {
 FSQueue rootQueue = queueMgr.getRootQueue();
 Resource clusterResource = getClusterResource();
 STATE_DUMP_LOG.debug(
   "FairScheduler state: Cluster Capacity: " + clusterResource +
   "  Allocations: " + rootMetrics.getAllocatedResources() +
   "  Availability: " + Resource.newInstance(
     rootMetrics.getAvailableMB(),
     rootMetrics.getAvailableVirtualCores()) +
   "  Demand: " + rootQueue.getDemand());
 STATE_DUMP_LOG.debug(rootQueue.dumpState());
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

/**
 * Recompute the internal variables used by the scheduler - per-job weights,
 * fair shares, deficits, minimum slot allocations, and amount of used and
 * required resources per job.
 */
protected synchronized void update() {
 long start = getClock().getTime();
 updateStarvationStats(); // Determine if any queues merit preemption
 FSQueue rootQueue = queueMgr.getRootQueue();
 // Recursively update demands for all queues
 rootQueue.updateDemand();
 rootQueue.setFairShare(clusterResource);
 // Recursively compute fair shares for all queues
 // and update metrics
 rootQueue.recomputeShares();
 updateRootQueueMetrics();
 if (LOG.isDebugEnabled()) {
  if (--updatesToSkipForDebug < 0) {
   updatesToSkipForDebug = UPDATE_DEBUG_FREQUENCY;
   LOG.debug("Cluster Capacity: " + clusterResource +
     "  Allocations: " + rootMetrics.getAllocatedResources() +
     "  Availability: " + Resource.newInstance(
     rootMetrics.getAvailableMB(),
     rootMetrics.getAvailableVirtualCores()) +
     "  Demand: " + rootQueue.getDemand());
  }
 }
 long duration = getClock().getTime() - start;
 fsOpDurations.addUpdateCallDuration(duration);
}
origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager

/**
 * Recompute the internal variables used by the scheduler - per-job weights,
 * fair shares, deficits, minimum slot allocations, and amount of used and
 * required resources per job.
 */
protected synchronized void update() {
 long start = getClock().getTime();
 updateStarvationStats(); // Determine if any queues merit preemption
 FSQueue rootQueue = queueMgr.getRootQueue();
 // Recursively update demands for all queues
 rootQueue.updateDemand();
 rootQueue.setFairShare(clusterResource);
 // Recursively compute fair shares for all queues
 // and update metrics
 rootQueue.recomputeShares();
 updateRootQueueMetrics();
 if (LOG.isDebugEnabled()) {
  if (--updatesToSkipForDebug < 0) {
   updatesToSkipForDebug = UPDATE_DEBUG_FREQUENCY;
   LOG.debug("Cluster Capacity: " + clusterResource +
     "  Allocations: " + rootMetrics.getAllocatedResources() +
     "  Availability: " + Resource.newInstance(
     rootMetrics.getAvailableMB(),
     rootMetrics.getAvailableVirtualCores()) +
     "  Demand: " + rootQueue.getDemand());
  }
 }
 long duration = getClock().getTime() - start;
 fsOpDurations.addUpdateCallDuration(duration);
}
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fairFSQueueMetricsgetAllocatedResources

Popular methods of FSQueueMetrics

  • forQueue
    Get the FS queue metric for the given queue. Create one and register it to metrics system if there i
  • getAvailableMB
  • getAvailableVirtualCores
  • <init>
  • getAllocatedMB
  • getAllocatedVirtualCores
  • getReservedMB
  • setAvailableResourcesToQueue
  • setFairShare
  • setMaxShare
  • setMinShare
  • setSteadyFairShare
  • setMinShare,
  • setSteadyFairShare,
  • sourceName,
  • submitApp,
  • submitAppAttempt,
  • tag,
  • getAMResourceUsageMB,
  • getAMResourceUsageVCores,
  • getFairShareMB

Popular in Java

  • Making http post requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • getContentResolver (Context)
  • onCreateOptionsMenu (Activity)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JFileChooser (javax.swing)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now