Resource queues control how cluster resources are allocated across workloads in YARN's Capacity Scheduler. Use the EMR console to associate queues with partitions and to add, modify, and delete resource queues.
Prerequisites
Before you begin, ensure that you have:
-
A cluster in the Running state. For details, see Create a cluster
-
Capacity Scheduler configured as the YARN scheduler
Limitations
-
Custom partition features require EMR V5.11.1, EMR V3.45.1, or a later minor version.
Associate a resource queue with a YARN partition
A YARN partition restricts where jobs in a queue can run—either to a specific set of labeled nodes (exclusive) or including those nodes when idle (non-exclusive). Associating a resource queue with a partition controls which queues can consume resources from that partition.
This feature requires EMR V5.12.1, EMR V3.46.1, or a later minor version. Disabling partition-queue association management disassociates all queues from the current partition.
-
Go to the Edit Resource Queue tab.
-
Log on to the EMR console. In the left-side navigation pane, click EMR on ECS.
-
In the top navigation bar, select the region where your cluster resides and select a resource group.
-
On the EMR on ECS page, find the target cluster and click Services in the Actions column.
-
On the Services tab, click Configure in the YARN section.
-
Click the Edit Resource Queue tab.
-
-
From the Select Partition drop-down list, select a partition. The default partition is DEFAULT_PARTITION, which all resource queues can access. To add a partition, see Manage YARN partitions in the EMR console.
-
Turn on Enable Partition-queue Association Management. Queues that can access the current partition or have capacity in it are displayed.
-
In the Enable Partition-queue Association Management dialog box, set Queue Capacity and click OK.
-
Apply the configuration.
-
Click the
icon at the top of the Edit Resource Queue tab. -
In the dialog box, find the target component and click refresh_queues in the Actions column.
-
Add a resource queue
Before adding a child queue to a leaf queue, stop the leaf queue first. Otherwise, the child queue fails to be added.
-
On the Edit Resource Queue tab, optionally select a partition from the Select Partition drop-down list. The default partition is DEFAULT_PARTITION.
-
Click Manage Queues, or click Manage Child Queues in the Actions column of the target queue.
-
In the Manage Child Queues dialog box, select a parent queue from the Select Parent Queue drop-down list. The default parent queue is the root queue.
-
Click Add Queue.
-
Set Queue Name, Queue Capacity, and Status, then click OK. The combined capacity of all child queues under a parent queue must equal 100%.
-
Apply the configuration.
-
Click the
icon at the top of the Edit Resource Queue tab. -
In the dialog box, find the target component and click refresh_queues in the Actions column.
-
Modify a resource queue
-
On the Edit Resource Queue tab, optionally select a partition from the Select Partition drop-down list. The default partition is DEFAULT_PARTITION.
-
Click the
icon to the left of the root queue name to expand the queue tree. -
Find the target queue and click Edit in the Actions column.
-
In the Edit dialog box, modify the parameters and click OK.
Parameter Description Current queue name The name of the resource queue. Edit it via Manage Queues or Manage Child Queues in the Actions column. Minimum user capacity The maximum percentage of cluster resources a single user can consume in this queue. Corresponds to Configured Minimum User Limit Percenton the YARN web UI. Editable only in DEFAULT_PARTITION.User limit factor The ratio of the maximum resources a single user can use to the total queue capacity. Corresponds to Configured user limit factoron the YARN web UI. Editable only in DEFAULT_PARTITION.Resource queue status The queue status. Valid values: Started and Stopped. Editable only in DEFAULT_PARTITION. To stop a parent queue, stop all its child queues first. Accessible partitions The partitions this queue can access. By default, all queues can access DEFAULT_PARTITION in EMR V5.12.1, EMR V3.46.1, or a later minor version. A child queue inherits its parent's accessible partitions but can also be configured separately. Default partition The default partition for this queue. If not set, DEFAULT_PARTITION is used. -
Apply the configuration.
-
Click the
icon at the top of the Edit Resource Queue tab. -
In the dialog box, find the target component and click refresh_queues in the Actions column.
-
Delete a resource queue
Deleting a queue is a two-phase process: first prepare the queue for deletion and apply the change, then delete it and apply again.
Before you start: A queue can be deleted only when all of the following conditions are met:
-
The queue is in the Stopped state.
-
The queue's capacity is 0 in all partitions.
-
The combined capacity of remaining child queues in the parent queue equals 100%.
If you use YARN 2.8.5, refresh_queues does not take effect when deleting a queue. After deletion, restart ResourceManager on the Status tab of the YARN service page for the change to take effect.
Phase 1: Prepare the queue
-
On the Edit Resource Queue tab, optionally select a partition from the Select Partition drop-down list. The default partition is DEFAULT_PARTITION.
-
Click Manage Queues.
-
In the Manage Child Queues dialog box, set the target queue's status to Stopped and its Queue Capacity to 0, then click OK.
-
Apply the configuration to make the stopped state take effect before deletion.
-
Click the
icon at the top of the Edit Resource Queue tab. -
In the dialog box, find the target component and click refresh_queues in the Actions column.
-
Phase 2: Delete the queue
-
Click Manage Queues again.
-
In the Manage Child Queues dialog box, click Delete in the Actions column of the target queue, then click OK.
-
Apply the configuration.
-
Click the
icon at the top of the Edit Resource Queue tab. -
In the dialog box, find the target component and click refresh_queues in the Actions column.
-