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 auto dynamic 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 auto dynamic 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.

  1. In Cloudera Manager, select the YARN Queue Manager UI.
    A graphical queue hierarchy is displayed in the Overview tab.
  2. Go to the Placement Rules tab.
  3. Click +Add.
    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.
  4. 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.
  5. Set what the rule should do when an application is matched.
    When an application is matched, do the following: Sets the placement rule policy.
  6. 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.
  7. 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.
  8. Set the fallback action.
  9. Check you placement rule settings.
  10. Click OK.
  11. Provide a description of the change and then click OK.
The rule is added to the bottom of the placement rule list and becomes the last rule to be evaluated.