congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FSOpDurations
Code IndexAdd Tabnine to your IDE (free)

How to use
FSOpDurations
in
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair

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

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

 @Override
 public void run() {
  while (!Thread.currentThread().isInterrupted()) {
   try {
    Thread.sleep(updateInterval);
    long start = getClock().getTime();
    update();
    preemptTasksIfNecessary();
    long duration = getClock().getTime() - start;
    fsOpDurations.addUpdateThreadRunDuration(duration);
   } catch (InterruptedException ie) {
    LOG.warn("Update thread interrupted. Exiting.");
    return;
   } catch (Exception e) {
    LOG.error("Exception in fair scheduler UpdateThread", e);
   }
  }
 }
}
origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager

public static FSOpDurations getInstance(boolean isExtended) {
 INSTANCE.setExtended(isExtended);
 return INSTANCE;
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

@Override
protected void nodeUpdate(RMNode nm) {
 writeLock.lock();
 try {
  long start = getClock().getTime();
  super.nodeUpdate(nm);
  FSSchedulerNode fsNode = getFSSchedulerNode(nm.getNodeID());
  attemptScheduling(fsNode);
  long duration = getClock().getTime() - start;
  fsOpDurations.addNodeUpdateDuration(duration);
 } finally {
  writeLock.unlock();
 }
}
origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager

fsOpDurations.addContinuousSchedulingRunDuration(duration);
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

fsOpDurations = FSOpDurations.getInstance(true);
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

int count = 0;
while (count < 100) {
 if (scheduler.fsOpDurations.hasUpdateThreadRunChanged()) {
  break;
  scheduler.fsOpDurations.hasUpdateThreadRunChanged());
assertEquals("Root queue metrics memory does not have expected value",
  memory, scheduler.getRootQueueMetrics().getAvailableMB());
scheduler.fsOpDurations.getMetrics(collector, true);
MetricsRecord record = collector.getRecords().get(0);
for (AbstractMetric abstractMetric : record.metrics()) {
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

@Test
public void testPerfMetricsInited() {
 scheduler.init(conf);
 scheduler.start();
 MetricsCollectorImpl collector = new MetricsCollectorImpl();
 scheduler.fsOpDurations.getMetrics(collector, true);
 assertEquals("Incorrect number of perf metrics", 1,
   collector.getRecords().size());
}
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

fsOpDurations.addPreemptCallDuration(duration);
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

 private void verifyNoCalls() {
  assertFalse("Update thread should not have executed",
    scheduler.fsOpDurations.hasUpdateThreadRunChanged());
  assertEquals("Scheduler queue memory should not have been updated",
    0, scheduler.getRootQueueMetrics().getAvailableMB());
  assertEquals("Scheduler queue cpu should not have been updated",
    0,scheduler.getRootQueueMetrics().getAvailableVirtualCores());
 }
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

fsOpDurations.addNodeUpdateDuration(duration);
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

fsOpDurations.addContinuousSchedulingRunDuration(duration);
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

fsOpDurations = FSOpDurations.getInstance(true);
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

@Test
public void testPerfMetricsInited() {
 scheduler.init(conf);
 scheduler.start();
 MetricsCollectorImpl collector = new MetricsCollectorImpl();
 scheduler.fsOpDurations.getMetrics(collector, true);
 assertEquals("Incorrect number of perf metrics", 1,
   collector.getRecords().size());
}
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

fsOpDurations.addPreemptCallDuration(duration);
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

public static FSOpDurations getInstance(boolean isExtended) {
 INSTANCE.setExtended(isExtended);
 return INSTANCE;
}
origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager

fsOpDurations.addNodeUpdateDuration(duration);
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

 @Override
 public void run() {
  while (!Thread.currentThread().isInterrupted()) {
   try {
    Thread.sleep(updateInterval);
    long start = getClock().getTime();
    update();
    preemptTasksIfNecessary();
    long duration = getClock().getTime() - start;
    fsOpDurations.addUpdateThreadRunDuration(duration);
   } catch (InterruptedException ie) {
    LOG.warn("Update thread interrupted. Exiting.");
    return;
   } catch (Exception e) {
    LOG.error("Exception in fair scheduler UpdateThread", e);
   }
  }
 }
}
origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

fsOpDurations.addContinuousSchedulingRunDuration(duration);
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fairFSOpDurations

Javadoc

Class to capture the performance metrics of FairScheduler. This should be a singleton.

Most used methods

  • addContinuousSchedulingRunDuration
  • addNodeUpdateDuration
  • addUpdateThreadRunDuration
  • getInstance
  • setExtended
  • addPreemptCallDuration
  • addUpdateCallDuration
  • getMetrics
  • hasUpdateThreadRunChanged

Popular in Java

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • compareTo (BigDecimal)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • JComboBox (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • From CI to AI: The AI layer in your organization
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