Class CapacitySchedulerQueueCapacityHandler

java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerQueueCapacityHandler

public class CapacitySchedulerQueueCapacityHandler extends Object
Controls how capacity and resource values are set and calculated for a queue. Effective minimum and maximum resource values are set for each label and resource separately.
  • Constructor Details

  • Method Details

    • updateChildren

      public QueueCapacityUpdateContext updateChildren(org.apache.hadoop.yarn.api.records.Resource clusterResource, CSQueue queue)
      Updates the resource and metrics values of all children under a specific queue. These values are calculated at runtime.
      Parameters:
      clusterResource - resource of the cluster
      queue - parent queue whose children will be updated
      Returns:
      update context that contains information about the update phase
    • updateRoot

      public void updateRoot(CSQueue rootQueue, org.apache.hadoop.yarn.api.records.Resource clusterResource)
      Updates the resource and metrics value of the root queue. Root queue always has percentage capacity type and is assigned the cluster resource as its minimum and maximum effective resource.
      Parameters:
      rootQueue - root queue
      clusterResource - cluster resource
    • setQueueCapacities

      public static void setQueueCapacities(org.apache.hadoop.yarn.api.records.Resource clusterResource, CSQueue queue, String label)
      Sets capacity and absolute capacity values of a queue based on minimum and maximum effective resources.
      Parameters:
      clusterResource - overall cluster resource
      queue - child queue for which the capacities are set
      label - node label