Apache Hadoop YARN
Apache Hadoop YARN
http://hadoop.apache.org/docs/r2.7.3/hadoop-yarn/hadoop-yarn-site/YARN.html
YARN的基本思想是:将资源管理功能和监控/调度job的功能分别在单独的进程执行。基于这个思想需要一个全局ResourceManager和每个应用程序的ApplicationMaster(AM).一个应用程序可以是单独job或者DAG jobs。
ResourceManager和NodeManager形成了数据计算框架。RM是为系统中所有应用程序分配资源的最高决断者。NodeManager是每个主机框架的代理,它负责管理容器,监控容器的资源使用情况并且向ResourceManager反馈。
每个应用程序的ApplicationMaster是框架中特定的library,它的任务是与RM进行资源协商并且与NodeManager合作执行和监控分配的任务。
YARN可以算是一种递归结构:整体是包括ResourceManager和NodeManager,但是在计算的时候有些主机又会生成ApplicationMaster从RM申请资源,并且管理这些资源在其它主机上的使用(RM-->分配resource-->ApplicationMaster-->管理Resoucr-->其它主机的容器)
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.

ResourceManager有两个主要的功能部分:Scheduler(调度者)和ApplicationManager(应用程序管理者)。
调度者负责为多个正在运行的应用程序分配资源。调度者只有纯粹的调度功能,就是说它没有监控和追踪应用程序状态的功能,同样它也不负责重启由于应用程序或硬件失败导致的失败任务。调度者有一个可插拔的协议:把集群资源按照不同应用进行分割(The Scheduler has a pluggable policy which is responsible for partitioning the cluster resources among the various queues, applications etc. The current schedulers such as the CapacityScheduler and the FairScheduler would be some examples of plug-ins.)。
ApplicationManager负责接收job-submissions,协调指定一个container来执行应用程序特定ApplicationMaster并且提供重新启动失败的ApplicationMaster容器的服务。每个应用程序的ApplicationMaster负责向调度者申请资源容器,并且跟踪容器的状态和监控。
浙公网安备 33010602011771号