Learnerslesson
   JAVA   
  SPRING  
  SPRINGBOOT  
 HIBERNATE 
  HADOOP  
   HIVE   
   ALGORITHMS   
   PYTHON   
   GO   
   KOTLIN   
   C#   
   RUBY   
   C++   





YARN Scheduling


To make quick and efficient processing YARN comes up with the below Scheduling mechanism :


FIFO(First In First Out) Scheduler :

The Job which is submitted first is executed first. The second job has to wait until the first job completes. The main drawback of FIFO scheduler is, a small job has to wait until a bigger job completes.



Capacity Scheduler :

The Capacity Scheduler overcomes the drawback of FIFO Scheduler. It creates queues with some resources(i.e. CPU, Memory), so that jobs with priorities can be submitted to those queues. And the jobs submitted to the queues are executed with FIFO Scheduling. The only drawback it has is, if few of the queues are not filled the resources won't be fully utilized. i.e. Say there are three Queues A, B, C. And only Queue A has Jobs lined up for execution. The resources allocated to Queue B and C will remain utilized.


Fair Scheduler :

The drawback of Capacity Scheduler is resolved by the Fair Scheduler. In a Fair scheduler all the jobs are equally distributed in all the queues.



Round-Robin Scheduling :

In Round-Robin Scheduling the jobs are taken from each queues based on a certain pattern and executed.


Preemptive Scheduling :

In a preemptive scheduling a currently running job is terminated/paused if a job of higher priority comes in.