Creating placement rules

You can create placement rules using the YARN Queue Manager UI in Cloudera Manager.

Placement rule that uses static queue
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.
Placement rule that uses dynamically created queues
Enable the 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 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. Navigate to Placement Rules.
  3. Click +Add.
    The Add Placement Rules dialog box is displayed with the default settings or with settings that are the exact replica of the last placement rule that you have created.
  4. Use the The rule should match application by property to set the application parameter that should match with the rule.
  5. Use the This rule should match field to set the value of the matching application parameter that should match with the rule.
  6. Set what the rule should do when an application is matched.
    When an application is matched, do the following: Sets the placement rule policy. The following options are available:
    • Place the application into a queue named for the user.
    • Place the application into a queue named for the user's primary group.
    • Place the application into a queue named for the user that is the child of a queue named for the user's primary group.
    • Place the application into a queue named for the user's secondary group.
    • Place the application into a queue named for the user that is the child of a queue named for the user's secondary group.
    • Place the application into a queue named for the application.
    • Place the application in the queue specified at run time.
    • Place the application into the default queue.
    • Reject the application.
    • Set the default queue to:
    • Use the following custom policy:
  7. Set additional configuration for the placement rule.
    Depending on the selected policy, different options become available. These are as follows:
    Table 1. Policy specification
    Selected policy Additional configuration
    • Place the application into a queue named for the user.
    • Place the application into a queue named for the user's primary group.
    • Place the application into a queue named for the user that is the child of a queue named for the user's primary group.
    • Place the application into a queue named for the user's secondary group.
    • Place the application into a queue named for the user that is the child of a queue named for the user's secondary group.
    • Place the application into a queue named for the application.
    The The parent of the queue in which the application is placed should be dropdown list appears. Select the parent of the queue to which the job should be submitted.
    • Place the application in the queue specified at run time.
    • Place the application into the default queue.
    • Reject the application.
    No additional configuration required.
    Set the default queue to: A dropdown list appears. Select which available queue you want to make the default queue.
    Use the following custom policy: A text box appears in which you can provide the custom policy you want to use.
  8. If you want the target queue to be created, if it does not exist at the time of the job submission, 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 7.
  9. Use the If the target queue does not exist and cannot be created, do the following property to set the fallback action.
    The following fallback actions are available:
    • Go to the next placement rule.
    • Place the application into the default queue.
    • Reject the application.
  10. Check you placement rule settings.
  11. Click OK.
  12. 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.