Class CapacitySchedulerQueueCapacityHandler
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacitySchedulerQueueCapacityHandler
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 Summary
ConstructorsConstructorDescriptionCapacitySchedulerQueueCapacityHandler(RMNodeLabelsManager labelsManager, CapacitySchedulerConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetQueueCapacities(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.updateChildren(org.apache.hadoop.yarn.api.records.Resource clusterResource, CSQueue queue) Updates the resource and metrics values of all children under a specific queue.voidupdateRoot(CSQueue rootQueue, org.apache.hadoop.yarn.api.records.Resource clusterResource) Updates the resource and metrics value of the root queue.
-
Constructor Details
-
CapacitySchedulerQueueCapacityHandler
public CapacitySchedulerQueueCapacityHandler(RMNodeLabelsManager labelsManager, CapacitySchedulerConfiguration configuration)
-
-
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 clusterqueue- 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 queueclusterResource- 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 resourcequeue- child queue for which the capacities are setlabel- node label
-