Created 05-18-2016 11:48 PM
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?
Created 01-25-2017 01:40 AM
Yes. It is expected for FIFO policy. If you set a FIFO policy, then jobs are executed in the order you submitted them. You have the option to use FAIR policy. In that case, all jobs can be executed sharing fairly available resources and they don't have to wait one after the other. They will still start in the order you submitted, but based on what they do, they may finish in a different order. That assumes your cluster has enough resources and by design you wanted to go that way.
I did not include references to various documents because they were already provided and are widely available.
Created 05-18-2016 11:57 PM
@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.
Created 05-19-2016 12:01 AM
Thanks Sridhar, but what if job3 runs after job1, and then job4 runs, and then job2 runs?
Created 05-19-2016 12:18 AM
in FIFO, it will execute in the order you have submitted the job. Refer: http://hortonworks.com/blog/understanding-apache-hadoops-capacity-scheduler/
Created 05-19-2016 12:51 AM
@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"?
Created 05-24-2016 06:57 PM
@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:
Manually:
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”
Created 01-25-2017 01:40 AM
Yes. It is expected for FIFO policy. If you set a FIFO policy, then jobs are executed in the order you submitted them. You have the option to use FAIR policy. In that case, all jobs can be executed sharing fairly available resources and they don't have to wait one after the other. They will still start in the order you submitted, but based on what they do, they may finish in a different order. That assumes your cluster has enough resources and by design you wanted to go that way.
I did not include references to various documents because they were already provided and are widely available.