YARN-分布式资源调度框架

YARN产生背景

YARN-分布式资源调度框架YARN-分布式资源调度框架YARN-分布式资源调度框架YARN-分布式资源调度框架YARN-分布式资源调度框架

YARN(Yet Another Resource Negotiator)

YARN的重要思想是将资源管理和作业调度和监视的功能划分到不同的进程中,这一思路产生了一个资源管理者和每个应用的应用管理员,一个应用程序要么是一个作业,要么是一堆作业。
(The fundamental idea of YARN is to split up the functionalities of resource management and job scheduling/monitoring into separate daemons. The idea is to have a global ResourceManager (RM) and per-application ApplicationMaster (AM). An application is either a single job or a DAG of jobs.)
YARN-分布式资源调度框架
资源管理者和节点管理者组成了数据计算框架。资源管理者拥有系统中所有应用的资源分配的最高权利。节点管理者是每台机器的框架代理,监视着他们的资源使用率(CPU,内存,硬盘,网络)并将其汇报给资源管理者和计划者。
(The ResourceManager and the NodeManager form the data-computation framework. The ResourceManager is the ultimate authority that arbitrates resources among all the applications in the system. The NodeManager is the per-machine framework agent who is responsible for containers, monitoring their resource usage (cpu, memory, disk, network) and reporting the same to the ResourceManager/Scheduler.)
每个应用的应用管理员,实际上,是框架特殊的库,其任务是协商资源管理者的资源,并与节点管理者一起执行和监视任务
(The per-application ApplicationMaster is, in effect, a framework specific library and is tasked with negotiating resources from the ResourceManager and working with the NodeManager(s) to execute and monitor the tasks.)

YARN架构

YARN-分布式资源调度框架YARN-分布式资源调度框架YARN-分布式资源调度框架YARN-分布式资源调度框架YARN-分布式资源调度框架
YARN-分布式资源调度框架

YARN执行流程:

  1. Client提交任务至RM
  2. 通知NM启动第一个Container
  3. 启动Container用以运行AM
  4. 将AM注册到RM中,并申请资源,RM返回资源分配
  5. 在不同的NM上启动Container
  6. NM执行启动命令,Container执行Task
    YARN-分布式资源调度框架