Create placement rules
Placement rules determine the queues to which applications and jobs are assigned. You can create placement rules using the YARN Queue Manager UI.
In case of a placement rule that uses static queue, you first have to create the target leaf queue before creating the placement rule that uses it. When creating the placement rule the UI will display all the existing leaf queues.
In case of a placement rule that uses dynamicaly created queues, you have to enable the dynamic auto child creation feature for the target parent queue before creating the placement rule that uses it. When creating the rule the UI will display all the existing queues as target parent queue options but if the dynamic auto child creation feature is not enabled for the selected queue, a warning message will be displayed and you cannot create the placement rule. For more information, see Manage dynamic queues.
In Cloudera Manager, select the YARN Queue Manager UI.
A graphical queue hierarchy is displayed in the Overview tab.
- Go to the Placement Rules tab.
The Add Placement Rules dialog box is dsiplayed with the default settings or with settings that are the exact replica of the last placement rule that you have created.
Set the application parameter that you want the rule to match:
- The rule should match application by: Set the application parameter that match with this rule.
- This rule should match: Set the value that match with this rule.
Set what the rule should do when an application is matched.
When an application is matched, do the following: Sets the placement rule policy.
Set the parent of the queue to which the job should be submitted.
The parent of the queue in which the application is placed should be: Select an available parent queue from the dropdown list.
If you want the the target queue to be created, if it does not exist select the
Create the target queue if it does not exist? checkbox. To enable
this feature, you have to set a parent queue in Step 6.
- Set the fallback action.
Check you placement rule settings.
- Click OK.
- Provide a description of the change and then click OK.