Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Configure preemption in Yarn Fair Scheduler

Solved Go to solution

Configure preemption in Yarn Fair Scheduler

Super Collaborator

Hi All, Is there any reference doc for configuring pre-emption is YARN Fair Scheduler?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Configure preemption in Yarn Fair Scheduler

Explorer

Hi Arun, FairScheduler is not HDP recommended/supported resource scheduler, so we don't have document to cover it. Please refer apache one: https://hadoop.apache.org/docs/r2.7.3/hadoop-yarn/hadoop-yarn-site/FairScheduler.html.

I would like to add more background here: preemption feature is firstly added into CapacityScheduler which is quit mature and production ready. For FairScheduler, I am not exactly sure status (alpha or GA) but just notice several fixes are going on in community: https://issues.apache.org/jira/browse/YARN-4752

Any special reason to use FairScheduler? If not, you can also try preemption for CapacityScheduler. Here is doc: https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/bk_yarn_resource_mgt/content/preemption.htm...

View solution in original post

9 REPLIES 9
Highlighted

Re: Configure preemption in Yarn Fair Scheduler

HDP dont support Fair Scheduler, it support only capacity scheduler, you can check the following documents to configure pre-emption in capacity scheduler

http://hortonworks.com/blog/better-slas-via-resource-preemption-in-yarns-capacityscheduler/

Highlighted

Re: Configure preemption in Yarn Fair Scheduler

Super Collaborator

@Rajkumar Singh, does that mean that setting the class to org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler does not take into effect?

Highlighted

Re: Configure preemption in Yarn Fair Scheduler

@Arun A K it does take effect after setting yarn.resourcemanager.scheduler.class value to org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler using ambari but there is no property in ambari with the name of yarn.scheduler.fair.allocation.file so you need to define the custom property with the name of yarn.scheduler.fair.allocation.file and set it to fair-scheduler.xml.

Highlighted

Re: Configure preemption in Yarn Fair Scheduler

Super Collaborator

@Rajkumar Singh, okay got it. One more related question - On which node should I be placing the fair allocation xml file?

Highlighted

Re: Configure preemption in Yarn Fair Scheduler

on RM node and restart the RM.

Highlighted

Re: Configure preemption in Yarn Fair Scheduler

Explorer

Hi Arun, FairScheduler is not HDP recommended/supported resource scheduler, so we don't have document to cover it. Please refer apache one: https://hadoop.apache.org/docs/r2.7.3/hadoop-yarn/hadoop-yarn-site/FairScheduler.html.

I would like to add more background here: preemption feature is firstly added into CapacityScheduler which is quit mature and production ready. For FairScheduler, I am not exactly sure status (alpha or GA) but just notice several fixes are going on in community: https://issues.apache.org/jira/browse/YARN-4752

Any special reason to use FairScheduler? If not, you can also try preemption for CapacityScheduler. Here is doc: https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/bk_yarn_resource_mgt/content/preemption.htm...

View solution in original post

Highlighted

Re: Configure preemption in Yarn Fair Scheduler

Super Collaborator

Thanks @Junping Du

Highlighted

Re: Configure preemption in Yarn Fair Scheduler

Hi Arun - This post describes how you can use preemption with a fair policy in the capacity scheduler. It should give you a similar behavior to the fair scheduler but using a YARN capacity queue.

https://community.hortonworks.com/articles/44079/yarn-pre-emption-with-spark-using-a-fair-policy.htm...

Highlighted

Re: Configure preemption in Yarn Fair Scheduler

Super Collaborator

Thanks Chris. I will have a look.

Don't have an account?
Coming from Hortonworks? Activate your account here