Defining Queue Labels for Capacity Scheduler

The Capacity Scheduler has a pre-defined queue called root. All queues in the system are children of the root queue. Further queues can be set up by configuring yarn.scheduler.capacity.root.queues with a list of comma-separated child queues.

If a parent queue has child queues, this is how labels and label policies are applied to the child queues:

  • If the child queues have their own labels or label policies, they are used.

  • If the child queues do not have their own labels or label policies, the parent queue’s labels and label policies apply.

To use label-based scheduling with the Capacity Scheduler, add the following property to the capacity-scheduler.xml file:

yarn.scheduler.capacity.root.<queue-name>.label 

For example, for a queue named alpha, the label could be defined like this:

<property>
   <name>yarn.scheduler.capacity.root.alpha.label</name> 
   <value>Fast||Development</value> 
</property>

When you make changes to queue labels or queue policies, remember to refresh them by running the following command:

yarn rmadmin -refreshQueues