一、概述
目前,Hadoop
作业调度器主要有三种:FIFO、容量(Capacity Scheduler)和公平(Fair Scheduler)
。Apache Hadoop3.1.3
默认的资源调度器是Capacity Scheduler
。
CDH
框架默认调度器是Fair Scheduler
。
配置:yarn-default.xml
xml
<property>
<description>The class to use as the resource scheduler.</description>
<name>yarn.resourcemanager.scheduler.class</name>
<value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler</value>
</property>
二、先进先出调度器(FIFO)
算法逻辑:单队列,根据提交作业的先后顺序,先来先服务。
生产环境中基本不用
三、容量调度器(Capacity Scheduler)[重点]
Capacity Scheduler
是Yahoo
开发的多用户调度器。
案例说明

四、公平调度器(Fair Schedulere)
Fair Schedulere
是Facebook
开发的多用户调度器。
缺额

比如,一个任务,应获得的资源是10G
内存,但是,实际分配到的只有6G
内存,所以,缺额为4G
。
DRF策略

Fair策略
