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

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

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

@Test
public void testContainerOrdering(){
 List<RMContainer> containers = new ArrayList<RMContainer>();
 ApplicationAttemptId appAttId = ApplicationAttemptId.newInstance(
   ApplicationId.newInstance(TS, 10), 0);
 // create a set of containers
 RMContainer rm1 = mockContainer(appAttId, 5, mock(Resource.class), 3);
 RMContainer rm2 = mockContainer(appAttId, 3, mock(Resource.class), 3);
 RMContainer rm3 = mockContainer(appAttId, 2, mock(Resource.class), 2);
 RMContainer rm4 = mockContainer(appAttId, 1, mock(Resource.class), 2);
 RMContainer rm5 = mockContainer(appAttId, 4, mock(Resource.class), 1);
 // insert them in non-sorted order
 containers.add(rm3);
 containers.add(rm2);
 containers.add(rm1);
 containers.add(rm5);
 containers.add(rm4);
 // sort them
 ProportionalCapacityPreemptionPolicy.sortContainers(containers);
 // verify the "priority"-first, "reverse container-id"-second
 // ordering is enforced correctly
 assert containers.get(0).equals(rm1);
 assert containers.get(1).equals(rm2);
 assert containers.get(2).equals(rm3);
 assert containers.get(3).equals(rm4);
 assert containers.get(4).equals(rm5);
}

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

 new ArrayList<RMContainer>(app.getLiveContainers());
sortContainers(containers);
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

 new ArrayList<RMContainer>(app.getLiveContainers());
sortContainers(containers);
org.apache.hadoop.yarn.server.resourcemanager.monitor.capacityProportionalCapacityPreemptionPolicysortContainers

Javadoc

Compare by reversed priority order first, and then reversed containerId order

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
  • <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.
  • getResourceCalculator
  • getNonLabeledResources,
  • getResourceCalculator,
  • isLabeledContainer,
  • preemptAMContainers,
  • preemptFrom,
  • recursivelyComputeIdealAssignment,
  • resetCapacity,
  • setNodeLabels,
  • addTempQueuePartition

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JComboBox (javax.swing)
  • 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