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

How to use
getAvailableVirtualCores
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.getAvailableVirtualCores (Showing top 5 results out of 315)

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);
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

private void registerNodeAndSubmitApp(
  int memory, int vcores, int appContainers, int appMemory) {
 RMNode node1 = MockNodes.newNodeInfo(
   1, Resources.createResource(memory, vcores), 1, "node1");
 NodeAddedSchedulerEvent nodeEvent1 = new NodeAddedSchedulerEvent(node1);
 scheduler.handle(nodeEvent1);
 assertEquals("Incorrect amount of resources in the cluster",
   memory, scheduler.rootMetrics.getAvailableMB());
 assertEquals("Incorrect amount of resources in the cluster",
   vcores, scheduler.rootMetrics.getAvailableVirtualCores());
 createSchedulingRequest(appMemory, "queueA", "user1", appContainers);
 scheduler.update();
 // Sufficient node check-ins to fully schedule containers
 for (int i = 0; i < 3; i++) {
  NodeUpdateSchedulerEvent nodeUpdate1 = new NodeUpdateSchedulerEvent(node1);
  scheduler.handle(nodeUpdate1);
 }
 assertEquals("app1's request is not met",
   memory - appContainers * appMemory,
   scheduler.rootMetrics.getAvailableMB());
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

public QueueStatistics getQueueStatistics() {
 QueueStatistics stats =
   recordFactory.newRecordInstance(QueueStatistics.class);
 stats.setNumAppsSubmitted(getMetrics().getAppsSubmitted());
 stats.setNumAppsRunning(getMetrics().getAppsRunning());
 stats.setNumAppsPending(getMetrics().getAppsPending());
 stats.setNumAppsCompleted(getMetrics().getAppsCompleted());
 stats.setNumAppsKilled(getMetrics().getAppsKilled());
 stats.setNumAppsFailed(getMetrics().getAppsFailed());
 stats.setNumActiveUsers(getMetrics().getActiveUsers());
 stats.setAvailableMemoryMB(getMetrics().getAvailableMB());
 stats.setAllocatedMemoryMB(getMetrics().getAllocatedMB());
 stats.setPendingMemoryMB(getMetrics().getPendingMB());
 stats.setReservedMemoryMB(getMetrics().getReservedMB());
 stats.setAvailableVCores(getMetrics().getAvailableVirtualCores());
 stats.setAllocatedVCores(getMetrics().getAllocatedVirtualCores());
 stats.setPendingVCores(getMetrics().getPendingVirtualCores());
 stats.setReservedVCores(getMetrics().getReservedVirtualCores());
 stats.setAllocatedContainers(getMetrics().getAllocatedContainers());
 stats.setPendingContainers(getMetrics().getPendingContainers());
 stats.setReservedContainers(getMetrics().getReservedContainers());
 return stats;
}

org.apache.hadoop.yarn.server.resourcemanager.scheduler.fairFSQueueMetricsgetAvailableVirtualCores

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
  • <init>
  • getAllocatedMB
  • getAllocatedResources
  • 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
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Permission (java.security)
    Legacy security code; do not use.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Best plugins for Eclipse
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