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.
Priority Scheduling works only with the FIFO (first-in,
first-out) ordering policy. FIFO is the default Capacity Scheduler ordering policy. You
can set cluster maximum and leaf-queue level priorities.
-
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 -appID
command-line option or
the Cluster Application REST API to set the priority for already running
applications.