Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

​Yarn Queue Capacity Scheduling

avatar
Rising Star

Has anyone come across the following scenario:

I launch 5 YARN jobs (requiring variable resources) in the same queue in this order:

job1, job2, job3, job4, job5

I’ve configured a Capacity Scheduler with FIFO ordering.

Observed behavior:

job 1 runs

job2 - job5 in waiting state

once job1 completes, job2-job5 runs in random order (job4, job2, job3, job5)

Is this expected?

1 ACCEPTED SOLUTION

avatar
Super Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
6 REPLIES 6

avatar

@Nasheb Ismaily: Yes, If job1 is using all the container then job2-job5 has to have wait, Else job2 will pick remaining container and start executing it.

avatar
Rising Star

Thanks Sridhar, but what if job3 runs after job1, and then job4 runs, and then job2 runs?

avatar

in FIFO, it will execute in the order you have submitted the job. Refer: http://hortonworks.com/blog/understanding-apache-hadoops-capacity-scheduler/

avatar
Super Collaborator

@Nasheb Ismaily, according to what I read, applications are in fifo order, according to the time of submission. If you submit them back to back very quickly, is it possible the timestamps are identical and arrived at the "same time"?

avatar
Super Collaborator

@Nasheb Ismaily, Double check your configuration. I know you already know this, but for the sake of a complete answer, here's how to configure FIFO.

The capacity scheduler queues can be configured for fifo or fair based via Ambari's Yarn Queue Manager (top right button). The default is fifo.

Via Ambari - Yarn Capacity Scheduler Queue configuration:

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.2/bk_performance_tuning/content/section_creat...

Manually:

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.0/bk_yarn_resource_mgt/content/flexible_sched...

Also, the Yarn Fair Scheduler can be configured for FIFO:

https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/FairScheduler.html

“schedulingPolicy: to set the scheduling policy of any queue. The allowed values are “fifo”/“fair”/“drf” or any class that extends”

avatar
Super Guru
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login