The ResourceManager has two main components: Scheduler and ApplicationsManager.
The ApplicationsManager is responsible for accepting job-submissions, negotiating the first container for executing the application specific ApplicationMaster and provides the service for restarting the ApplicationMaster container on failure.AM的功能和MPV1中的JobTracker类似。
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 has the responsibility of negotiating appropriate resource containers from the Scheduler, tracking their status and monitoring for progress.
YARN是一个典型的二级调度器。RM管理全局资源与调度,为一级调度器,将资源分配给每个Application Master。而Application Master为二级调度器,负责在不同的Node间分配协调资源,在container运行子任务。