Hadoop 2.0 ApplicationMaster vs NodeManager

I am having trouble identifying the differences between the ApplicationMaster and NodeManager in the Hadoop 2.0 architecture. I know that the ApplicationMaster is responsible for running the map and reduce tasks and it retrieves containers to run these tasks by coordinating with the ResourceManager. But I am confused on the purpose of the NodeManager. Does the NodeManager create the containers for the ApplicationMaster (to run those map and reduce tasks) or does the ResourceManager create the containers for the ApplicationMaster (to run those map and reduce tasks) and the NodeManager just manages the health of the node, securely place files and directories needed by containers for the ApplicationMaster, and monitor the container's resource usage, etc.

2,849 1 1 gold badge 29 29 silver badges 40 40 bronze badges asked Sep 17, 2016 at 22:29 user5228393 user5228393

1 Answer 1

ResourceManager(one per cluster) - arbitrates resources among all the applications.

NodeManager - responsible for containers launch, monitoring their resource usage (cpu, memory, disk, network) and reporting it to the ResourceManager/Scheduler.

So, in answer to your question, ResourceManager doesn't launch containers itself it finds the suitable NodeManager that can do that.

Some pictures and links with more details bellow.

YARN Architecture from official Hadoop docs:

Anatomy of a YARN Application Run(from "Hadoop: The Definitive Guide" by Tom White):