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

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

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

/**
 * This method recursively computes the ideal assignment of resources to each
 * level of the hierarchy. This ensures that leafs that are over-capacity but
 * with parents within capacity will not be preempted. Preemptions are allowed
 * within each subtree according to local over/under capacity.
 *
 * @param root the root of the cloned queue hierachy
 * @param totalPreemptionAllowed maximum amount of preemption allowed
 * @return a list of leaf queues updated with preemption targets
 */
private List<TempQueue> recursivelyComputeIdealAssignment(
  TempQueue root, Resource totalPreemptionAllowed) {
 List<TempQueue> leafs = new ArrayList<TempQueue>();
 if (root.getChildren() != null &&
   root.getChildren().size() > 0) {
  // compute ideal distribution at this level
  computeIdealResourceDistribution(rc, root.getChildren(),
    totalPreemptionAllowed, root.idealAssigned);
  // compute recursively for lower levels and build list of leafs
  for(TempQueue t : root.getChildren()) {
   leafs.addAll(recursivelyComputeIdealAssignment(t, totalPreemptionAllowed));
  }
 } else {
  // we are in a leaf nothing to do, just return yourself
  return Collections.singletonList(root);
 }
 return leafs;
}
origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager

/**
 * This method recursively computes the ideal assignment of resources to each
 * level of the hierarchy. This ensures that leafs that are over-capacity but
 * with parents within capacity will not be preempted. Preemptions are allowed
 * within each subtree according to local over/under capacity.
 *
 * @param root the root of the cloned queue hierachy
 * @param totalPreemptionAllowed maximum amount of preemption allowed
 * @return a list of leaf queues updated with preemption targets
 */
private List<TempQueue> recursivelyComputeIdealAssignment(
  TempQueue root, Resource totalPreemptionAllowed) {
 List<TempQueue> leafs = new ArrayList<TempQueue>();
 if (root.getChildren() != null &&
   root.getChildren().size() > 0) {
  // compute ideal distribution at this level
  computeIdealResourceDistribution(rc, root.getChildren(),
    totalPreemptionAllowed, root.idealAssigned);
  // compute recursively for lower levels and build list of leafs
  for(TempQueue t : root.getChildren()) {
   leafs.addAll(recursivelyComputeIdealAssignment(t, totalPreemptionAllowed));
  }
 } else {
  // we are in a leaf nothing to do, just return yourself
  return Collections.singletonList(root);
 }
 return leafs;
}
origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

  percentageClusterPreemptionAllowed);
List<TempQueue> queues =
 recursivelyComputeIdealAssignment(tRoot, totalPreemptionAllowed);
origin: com.github.jiayuhan-it/hadoop-yarn-server-resourcemanager

  percentageClusterPreemptionAllowed);
List<TempQueue> queues =
 recursivelyComputeIdealAssignment(tRoot, totalPreemptionAllowed);
org.apache.hadoop.yarn.server.resourcemanager.monitor.capacityProportionalCapacityPreemptionPolicyrecursivelyComputeIdealAssignment

Javadoc

This method recursively computes the ideal assignment of resources to each level of the hierarchy. This ensures that leafs that are over-capacity but with parents within capacity will not be preempted. Preemptions are allowed within each subtree according to local over/under capacity.

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • JComboBox (javax.swing)
  • Top PhpStorm 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