Enabling and Disabling Fair Scheduler Preemption
You can enable the Fair Scheduler to preempt applications in other pools if a pool's fair or minimum share is not met for some period of time. When you create a pool, you can specify whether preemption is allowed and whether a specific pool can be preempted. Fair scheduler preemption is controlled by several properties. For more information, see Configuring the Fair Scheduler.
Enabling and Disabling Preemption Using Cloudera Manager
Minimum Required Role: Configurator (also provided by Cluster Administrator, Full Administrator)
Enabling Preemption
- Select . If the cluster has a YARN service, the tab displays.
- Click Default Settings.
- Click the Enable Fair Scheduler Preemption link.
- Select the ResourceManager Default Group checkbox.
- Click Save Changes to commit the changes.
- Return to the Home page by clicking the Cloudera Manager logo.
- Click the icon next to any stale services to invoke the cluster restart wizard.
- Click Restart Stale Services.
- Click Restart Now.
- Click Finish.
Disabling Preemption
- Select . If the cluster has a YARN service, the tab displays.
- In Cloudera Manager select the YARN service.
- Clear the Enable Fair Scheduler Preemption checkbox.
- Click Save Changes to commit the changes.
- Return to the Home page by clicking the Cloudera Manager logo.
- Click the icon next to any stale services to invoke the cluster restart wizard.
- Click Restart Stale Services.
- Click Restart Now.
- Click Finish.
Enabling and Disabling Preemption Using the Command Line
To enable and disable preemption, set yarn.scheduler.fair.preemption in yarn-site.xml:
<property> <name>yarn.scheduler.fair.preemption</name> <value>true</value> </property>To enable or disable a specific pool from being preempted, set the allowPreemptionFrom property in fair-scheduler.xml. The following example disables preemption from the important pool:
<queue name="important"> <weight>1.0</weight> <allowPreemptionFrom>false</allowPreemptionFrom> <schedulingPolicy>drf</schedulingPolicy> <aclSubmitApps>*</aclSubmitApps> <aclAdministerApps>*</aclAdministerApps> </queue>