Tabnine Logo
ProportionalCapacityPreemptionPolicy.getResourceCalculator
Code IndexAdd Tabnine to your IDE (free)

How to use
getResourceCalculator
method
in
org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity.ProportionalCapacityPreemptionPolicy

Best Java code snippets using org.apache.hadoop.yarn.server.resourcemanager.monitor.capacity.ProportionalCapacityPreemptionPolicy.getResourceCalculator (Showing top 2 results out of 315)

origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

@Test
public void testPolicyInitializeAfterSchedulerInitialized() {
 @SuppressWarnings("resource")
 MockRM rm = new MockRM(conf);
 rm.init(conf);
 
 // ProportionalCapacityPreemptionPolicy should be initialized after
 // CapacityScheduler initialized. We will 
 // 1) find SchedulingMonitor from RMActiveService's service list, 
 // 2) check if ResourceCalculator in policy is null or not. 
 // If it's not null, we can come to a conclusion that policy initialized
 // after scheduler got initialized
 for (Service service : rm.getRMActiveService().getServices()) {
  if (service instanceof SchedulingMonitor) {
   ProportionalCapacityPreemptionPolicy policy =
     (ProportionalCapacityPreemptionPolicy) ((SchedulingMonitor) service)
       .getSchedulingEditPolicy();
   assertNotNull(policy.getResourceCalculator());
   return;
  }
 }
 
 fail("Failed to find SchedulingMonitor service, please check what happened");
}

origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

@Test
public void testPolicyInitializeAfterSchedulerInitialized() {
 @SuppressWarnings("resource")
 MockRM rm = new MockRM(conf);
 rm.init(conf);
 // ProportionalCapacityPreemptionPolicy should be initialized after
 // CapacityScheduler initialized. We will 
 // 1) find SchedulingMonitor from RMActiveService's service list, 
 // 2) check if ResourceCalculator in policy is null or not. 
 // If it's not null, we can come to a conclusion that policy initialized
 // after scheduler got initialized
 // Get SchedulingMonitor from SchedulingMonitorManager instead
 CapacityScheduler cs = (CapacityScheduler) rm.getResourceScheduler();
 SchedulingMonitorManager smm = cs.getSchedulingMonitorManager();
 Service service = smm.getAvailableSchedulingMonitor();
 if (service instanceof SchedulingMonitor) {
  ProportionalCapacityPreemptionPolicy policy =
    (ProportionalCapacityPreemptionPolicy) ((SchedulingMonitor) service)
      .getSchedulingEditPolicy();
  assertNotNull(policy.getResourceCalculator());
  return;
 }
 
 fail("Failed to find SchedulingMonitor service, please check what happened");
}

org.apache.hadoop.yarn.server.resourcemanager.monitor.capacityProportionalCapacityPreemptionPolicygetResourceCalculator

Popular methods of ProportionalCapacityPreemptionPolicy

  • cloneQueues
    This method walks a tree of CSQueue and clones the portion of the state relevant for preemption in T
  • containerBasedPreemptOrKill
    This method selects and tracks containers to be preemptionCandidates. If a container is in the targe
  • init
  • logToCSV
  • sortContainers
    Compare by reversed priority order first, and then reversed containerId order
  • <init>
  • computeFixpointAllocation
    Given a set of queues compute the fix-point distribution of unassigned resources among them. As pend
  • computeIdealResourceDistribution
    This method computes (for a single level in the tree, passed as a List) the ideal assignment of reso
  • editSchedule
  • getContainersToPreempt
    Based a resource preemption target drop reservations of containers and if necessary select container
  • getMostUnderservedQueues
  • getNonLabeledResources
    This method returns all non labeled resources.
  • getMostUnderservedQueues,
  • getNonLabeledResources,
  • isLabeledContainer,
  • preemptAMContainers,
  • preemptFrom,
  • recursivelyComputeIdealAssignment,
  • resetCapacity,
  • setNodeLabels,
  • addTempQueuePartition

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top Sublime Text plugins
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