Enable priority scheduling
You can use Priority Scheduling to run YARN applications at higher priority, regardless of other applications that are already running in the cluster. YARN allocates more resources to applications running at a higher priority over those running at a lower priority. Priority Scheduling enables you to set an application's priority both at the time of submission and dynamically at run time.
- In Cloudera Manager, select the YARN service.
- Click the Configuration tab.
- Search for yarn-site.xml.
In YARN Service Advanced Configuration Snippet (Safety Valve) for
yarn-site.xml field, add the following:
Name: yarn.cluster.max-application-priority Value: <priorityh> Description: The maximum priority for an application in the cluster.
Any application submitted with a priority greater than this setting has its priority reset to the yarn.cluster.max-application-priority value.
Name: yarn.scheduler.capacity.root.<leaf-queue-path>.default-application-priority Value: <priorityh> Description: The default application priority in a leaf queue.
The default application priority is used for any application submitted without a specified priority.
Use either the
yarn application -appIDcommand-line option or the Cluster Application REST API to set the priority for already running applications.
yarn application -appID<appID>
- Cluster Application Priority API