From Big Data to the Cloud, Part 2.2 — Inside Hadoop: YARN and the Life of a Job
Nov 29, 2026
A calm, sequential guide for anyone entering the field. The article is divided into smaller chapters to make it easier to understand.

Part 2.1 opened the two Hadoop components that touch the data directly. HDFS cut a 400 MB file into four blocks, spread them across the cluster, and kept three copies of each, so that a failing DataNode — announced by its missing heartbeat — costs us nothing. The NameNode holds the map of which block lives where, with a Standby ready to take over in a High Availability setup. MapReduce then processed that data where it already lay: Map on each node’s own piece, Shuffle & Sort to bring each key’s values together, Reduce to combine them. We ran it by hand twice — counting words and averaging ages — and watched the right answer appear without any single node ever seeing the whole file.
But Part 2.1 left one of Part 1’s three questions open, and it made an assumption to get past it. Every time we said “the program runs on the node that holds the data,” we skipped over who arranges that. Something must decide which machine runs which task, how much CPU and memory each task may use, and how several jobs share one cluster without trampling each other. That is Part 1’s remaining question — how do the nodes communicate and coordinate? — and this part answers it.
We do it in two steps. First we open the last core component, YARN, and meet its four parts. Then we put everything from Part 2 to work at once and follow a single job through the cluster, from the moment it is submitted to the moment it finishes. And at the very end, with the whole of Hadoop finally in view, we take one honest step back and name the burden it still leaves on our hands — because that burden is where the cloud begins.

Chapter 1: YARN — Who Gets Which CPU and Memory
The Cluster’s Resource Manager
HDFS gave the data a home, and MapReduce gave us a way to process it. But a cluster is shared. Several jobs may want to run at the same time, and every one of them needs CPU and memory on some machine. Something has to decide who gets what. That is YARN, Yet Another Resource Negotiator: it manages the cluster’s resources (CPU, memory) and schedules jobs. In the layered stack from Part 2.1, it is the middle layer — above the data in HDFS, below the processing in MapReduce — and it is the answer to Part 1’s open question: how do nodes communicate and coordinate?
YARN has a second, quieter importance. It separates resource management from processing. Because YARN only hands out resources and does not care what runs on them, processing engines other than MapReduce — Apache Spark, for example — can run on the same cluster. This matters because Part 1 listed one of Hadoop’s limitations as being designed for batch processing, with Spark better suited to real-time work. YARN is what lets both live on one cluster.
Four Parts
- ResourceManager (master): allocates resources across the whole cluster.
- NodeManager (one per node): manages the resources on its own machine and reports to the ResourceManager.
- ApplicationMaster (one per job): coordinates and monitors the tasks of one application.
- Container: a bundle of CPU + memory where a task actually runs.
The pattern should look familiar from Part 2.1. HDFS had one master (the NameNode) and many workers (the DataNodes). YARN has one master (the ResourceManager) and many workers (the NodeManagers). What YARN adds is a manager per job — the ApplicationMaster — so that the cluster-wide master never has to babysit the details of every individual job.
Who Is Inside Whom
Four parts from YARN plus two from HDFS is a lot of names, and the fastest way to untangle them is to ask where each one physically lives.
Cluster
├── Master machine
│ ├── ResourceManager
│ └── NameNode
└── Worker machine
├── DataNode → stores blocks
└── NodeManager
└── Containers → one of them may hold the job's ApplicationMaster
Read the tree from top to bottom and two things stand out. First, the master machine runs both masters — the ResourceManager for YARN and the NameNode for HDFS. Second, every worker machine runs both workers — a DataNode, which stores blocks, and a NodeManager, which runs containers. That pairing is not a coincidence; it is what makes “move the code to the data” possible. The machine that holds a block is also a machine that can run a task on it.
Notice, too, that the ApplicationMaster does not have a machine of its own. It runs inside a container, on a worker, like any other task.

Chapter 2: Running a Job, Step by Step
Six Steps
We now have every piece. The last thing to see is how they move together when a single job runs. There are six steps.
1. Submit. The client sends the job to the ResourceManager.
2. Start a manager. The ResourceManager starts an ApplicationMaster for this job, on any free node. From here on, this job has its own manager.
3. Find the data. The ApplicationMaster asks the NameNode: “Where is my data?” The NameNode, holding the map, answers with the machines that hold each block.
4. Ask for workers. The ApplicationMaster asks the ResourceManager for containers — ideally on the nodes that hold the data.
5. Do the work. The NodeManagers start the containers, and each task reads data from its own machine.
6. Finish. The ApplicationMaster and the containers are removed. The main services — the ResourceManager, the NameNode, the NodeManagers, the DataNodes — keep running for the next job.
Where Each Component Shows Up
It is worth reading the six steps again, this time watching which component does what.
| Step | Component(s) involved | What it shows |
|---|---|---|
| Submit | Client → ResourceManager (YARN) | YARN is the front door for every job |
| Start a manager | ResourceManager → ApplicationMaster | Each job gets its own manager |
| Find the data | ApplicationMaster → NameNode (HDFS) | The NameNode’s map decides where work should go |
| Ask for workers | ApplicationMaster → ResourceManager | Resources are requested close to the data |
| Do the work | NodeManagers, containers, DataNodes | Tasks read from their own machine’s disk |
| Finish | ApplicationMaster and containers end | Per-job parts are temporary; core services persist |
Steps 3 and 4 are where the whole design pays off. The NameNode knows where the data is; the ResourceManager knows where the free resources are; the ApplicationMaster puts the two together and asks for containers on the machines that already hold its blocks. So in step 5, each task reads from its own machine’s disk instead of pulling data across the network.
This is also the moment the assumption from Part 2.1 is paid off. When the word-count example said “the three lines go to three different nodes,” this is what was really happening underneath: an ApplicationMaster asked the NameNode where the data was, and asked the ResourceManager for containers on exactly those nodes.
The Key Idea
Everything in Part 2 reduces to one sentence:
Hadoop moves the work to the data, not the data to the work.
HDFS makes it possible, by spreading the data across the workers and remembering where it went. MapReduce relies on it, by running each map task on the node that holds its block. YARN carries it out, by placing containers next to the data. Three components, one principle.
The Whole Chain at a Glance
Part 1 left us three new problems the cluster created. With YARN in place, every one of them now has an answer.
| Problem from Part 1 | Hadoop’s answer | Mechanism |
|---|---|---|
| Which data lives on which node? | HDFS | Blocks of 128 MB; the NameNode keeps the map |
| What happens when a machine crashes? | Heartbeats + replication (+ HA for the NameNode) | Every 3 seconds “I’m alive”; 3 copies of every block |
| How do we process it fast enough? | MapReduce | Map in parallel, shuffle by key, reduce — code moves to data |
| How do nodes communicate and coordinate? | YARN | ResourceManager, NodeManagers, one ApplicationMaster per job |
Every row is an answer to a question we asked before we ever saw Hadoop. That is the sense in which Hadoop is not arbitrary: it is the cluster from Part 1, with each of its new problems given a specific, working solution.
What Hadoop Still Leaves on Our Hands
There is one more honest step to take before we close, because it is the bridge to the rest of this series.
Hadoop solves storage, processing, and coordination on a cluster. But look at what it assumes: that we already have the cluster. Every DataNode, every NodeManager, the master machine running the NameNode and the ResourceManager, the Standby for High Availability — each of these is a real machine that someone has to buy, place, power, connect, and look after. Part 1 listed the consequences among Hadoop’s limitations, and now we can read them from the inside:
- It is complex to configure and maintain. Across Part 2 we have met NameNodes and DataNodes, Secondary and Standby NameNodes, ResourceManagers, NodeManagers, ApplicationMasters, containers, block sizes, and replication factors. Every one of them is something to set up correctly and keep healthy.
- Replication uses extra storage space. The 400 MB file from Part 2.1 needed 1,200 MB of real disk. Those disks have to be bought before the data arrives.
- It is designed for batch processing, not real time. YARN lets engines like Spark share the cluster, but someone still has to install and run them.
And then there is the small word Part 1 asked us to keep in our pocket. The Scalability question was: how do we grow or shrink resources as data changes? Hadoop answers the first half well — when data grows, add more nodes. But the second half is still waiting. The nodes we added are machines we own. When the data shrinks, or the busy period ends, they do not disappear; they sit in the server room, waiting for the next job, still needing power and care.
So the cluster solves the technical problem of big data, and leaves us holding the practical one: owning, running, and sizing the machines themselves. What if we could have the cluster without owning it — use exactly the machines we need, for exactly as long as we need them, and let someone else configure, maintain, and replace them?
That question is the definition of the cloud.
What Comes in Part 3
Part 3 leaves the inside of Hadoop and steps back. It defines the cloud — carefully, from the ground up — and reads it as the answer to the burden this part ended on: the machines we had to buy, the complex system we had to configure and maintain, and the capacity that could grow but not easily shrink.
The idea of a cluster does not go away. The data still needs to be stored across many machines, processed in parallel, and protected against failure — everything in Part 2 still happens. What changes is who owns the machines, and how quickly they can appear and disappear. From there, the series continues into the cloud itself: its services and how they are built.
References
- Deshpande, T., Karanth, S., & Turkington, G. Hadoop: Data Processing and Modelling (Learning Path). Packt Publishing.
- Oracle. What Is Big Data? https://www.oracle.com/big-data/what-is-big-data/
- Big Data — Understanding Hadoop: Architecture, Features, Challenges & Applications. Medium. https://medium.com/@rp99452/big-data-understanding-hadoop-architecturefeatures-challenges-applications-c7ab7011e375
- Mehta, C. B. (2022). A Comprehensive Review of Hadoop Ecosystem for Big Data Processing and Analytics. IJNRD, 7(10).