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

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now