Three generations in one office
At Kabir's internship, three engineers sit at the same table. Mr Iyer has run Hadoop since 2010 and still says “check the JobTracker”. Ms Fernandes moved the company to Hadoop 2 in 2014 and talks about “YARN queues”. The new hire, Ananya, set up Hadoop 3 last year and keeps mentioning “erasure coding”. Kabir wonders whether they are even using the same software.
Sir, are they all talking about the same Hadoop?
The same project, three generations. HDFS and the idea of MapReduce stayed. What changed is how the cluster is managed. In Hadoop 1, one process, the JobTracker, managed every job and every machine. It became the bottleneck.
So Hadoop 2 split that job into pieces?
Yes: YARN. A ResourceManager only hands out resources; each job gets its own ApplicationMaster. Suddenly the cluster could run Spark and other engines too, and grow much bigger. Hadoop 2 also fixed the NameNode being a single point of failure.
And Hadoop 3?
It's about efficiency and modern hardware: erasure coding to cut storage, more than one standby NameNode, GPU scheduling, newer Java. Interviewers love the question “what is the difference between Hadoop 1, 2 and 3?” By the end of today you'll answer it better than most working engineers.
Hadoop 1, 2 and 3
Hadoop 1 (1.x, first stable release December 2011) consists of HDFS with a single NameNode and MapReduce v1, in which one JobTracker performs both cluster resource management and job scheduling/monitoring, and TaskTrackers run tasks in fixed map and reduce slots. Hadoop 2 (2.x, GA October 2013) introduces YARN, separating resource management (ResourceManager, NodeManagers) from per-application logic (ApplicationMaster), so MapReduce becomes one of many YARN applications; it also adds HDFS High Availability and Federation. Hadoop 3 (3.x, GA December 2017) requires Java 8 or later and adds HDFS erasure coding, more than two NameNodes for HA, new default ports outside the Linux ephemeral range, YARN Timeline Service v2, opportunistic containers and support for resource types such as GPUs.
Hadoop 1: one boss (JobTracker) ran every job and every machine, and only MapReduce could run. Hadoop 2: YARN split the boss into a resource manager plus a small manager for each job, so any engine can share the cluster, and the NameNode got a backup. Hadoop 3: saves storage with erasure coding, allows more backups, uses modern hardware like GPUs, and needs a newer Java.
Words you'll meet in this lesson
Release facts
| Hadoop 1.0.0 | 27 December 2011 |
|---|---|
| Hadoop 2.2.0 (first GA of 2.x) | 15 October 2013: YARN, HDFS HA, Federation |
| Hadoop 3.0.0 GA | December 2017: erasure coding, Java 8 minimum, new ports, multiple standby NameNodes |
| Hadoop 3.1 and 3.2 | 2018–2019: GPU/FPGA scheduling on YARN and other improvements |
| Hadoop 3.3 | 2020: Java 11 runtime support, ARM support, many cloud-connector improvements |
| Hadoop 3.4.0 / 3.4.3 | March 2024 / February 2026 |
| Hadoop 3.5.0 | 2 April 2026: first stable release of the 3.5 line; server side requires JDK 17 (clients 17 or 21) |
Dates from the Apache Hadoop release pages. Check each release's notes for its supported Java versions before installing.
The versions at three levels
Beginner One principal, or a principal and many class teachers
- Hadoop 1: one principal personally plans every class, every period and every exam for the whole school. Fine for a small school; impossible for a huge one.
- Hadoop 2: the principal only assigns classrooms and time (resources). Each class has its own class teacher (ApplicationMaster) who plans that class. Any subject can be taught, not just one.
- Hadoop 3: the same school, run more efficiently: smaller storerooms (erasure coding), more vice-principals ready to take over (standby NameNodes), science labs with special equipment (GPUs).
Intermediate What exactly changed between 1 and 2
- JobTracker split in two: the ResourceManager (cluster-wide resources) and one ApplicationMaster per job (task scheduling, retries, progress).
- Slots → containers: Hadoop 1 nodes had, say, 8 map and 4 reduce slots. If only map tasks were waiting, the reduce slots sat empty. YARN containers can run either kind of task.
- Beyond MapReduce: any framework that writes an ApplicationMaster can run: Spark, Tez (used by Hive), Flink, and others.
- HDFS HA: an active and a standby NameNode share the edit log through JournalNodes; ZooKeeper-based failover controllers switch automatically.
- Federation: several NameNodes can split the namespace (for example
/userand/data) so metadata scales beyond one machine's RAM. - Default block size 128 MB.
Advanced What Hadoop 3 added, and why it matters
- Erasure coding: with the RS-6-3 policy, 6 data cells get 3 parity cells: 1.5× storage and tolerance of 3 lost cells, versus 3× for replication. Costs CPU and network to rebuild, so it suits cold data.
- More than two NameNodes: with three NameNodes and five JournalNodes the cluster survives two NameNode failures.
- Ports: defaults moved out of the Linux ephemeral range (32768–61000) to avoid clashes; for example the NameNode web UI moved from 50070 to 9870.
- YARN: Timeline Service v2, opportunistic containers, resource types (GPUs, FPGAs), Docker containers, and Router-based Federation for very large clusters.
- Cloud storage: much better S3A, Azure and other connectors, so Hadoop tools can read and write object storage directly.
- Intra-DataNode disk balancer (
hdfs diskbalancer) evens out data across the disks inside one node.
Exam tip: The classic question “Differentiate Hadoop 1 and Hadoop 2” expects a table: JobTracker + TaskTracker vs ResourceManager + NodeManager + ApplicationMaster, slots vs containers, MapReduce only vs many engines, NameNode SPOF vs HA, single namespace vs federation, ~4,000 nodes vs much larger, 64 vs 128 MB default block. Add 2–3 Hadoop 3 lines (erasure coding, multiple standbys, Java 8+, port changes) to stand out.
Hadoop 1 vs 2 vs 3 at a glance
| Hadoop 1 | Hadoop 2 | Hadoop 3 | |
|---|---|---|---|
| Resource management | JobTracker (also schedules tasks) | YARN: ResourceManager + NodeManagers | YARN, plus opportunistic containers, resource types, Docker |
| Per-job management | JobTracker | ApplicationMaster per job | ApplicationMaster per job |
| Unit of resources | Fixed map / reduce slots | Containers (memory + vcores) | Containers, also GPUs/FPGAs |
| Engines | MapReduce only | MapReduce, Spark, Tez, … | Same, better isolation |
| NameNode availability | Single NameNode (Secondary does checkpoints only) | Active + 1 standby (HA) | Active + 2 or more standbys |
| Namespace scale | One NameNode | Federation | Federation + Router-based Federation |
| Fault tolerance of data | Replication (3×) | Replication (3×) | Replication or erasure coding (~1.5×) |
| Default block size | 64 MB | 128 MB | 128 MB |
| Typical scale limit | ~4,000 nodes per cluster | Around 10,000 nodes per cluster | Tens of thousands with federation |
| Java | Java 6 | Java 7 (later 2.x: 8) | Java 8 (3.3/3.4: also Java 11 runtime; 3.5: servers require JDK 17) |
| NameNode web UI port | 50070 | 50070 | 9870 |
Scale limits are the commonly quoted design figures; real clusters vary with hardware and workload.
Port numbers that changed in Hadoop 3
| Service | Hadoop 2 | Hadoop 3 |
|---|---|---|
| NameNode web UI (HTTP) | 50070 | 9870 |
| NameNode web UI (HTTPS) | 50470 | 9871 |
| Secondary NameNode web UI | 50090 | 9868 |
| DataNode data transfer | 50010 | 9866 |
| DataNode IPC | 50020 | 9867 |
| DataNode web UI | 50075 | 9864 |
| ResourceManager web UI | 8088 | 8088 (unchanged) |
Many old tutorials still say “open http://localhost:50070”. On Hadoop 3 that page doesn't exist: use 9870. If a guide uses 50070, it is written for Hadoop 2, and other details may be outdated too.
Why Hadoop 1's JobTracker hit a wall
One process, every decision
In Hadoop 1, every TaskTracker heartbeats to the JobTracker, and the JobTracker decides every task placement for every running job.
It also keeps the progress, counters and history of all jobs in its own memory. The more nodes and jobs, the more work for this single process.Count the load
Around 4,000 nodes and 40,000 concurrent tasks is where Hadoop 1 clusters typically topped out. Beyond that the JobTracker became slow or unstable.nodes, hb_interval_s = 4000, 3 tasks_running = 40000 print(nodes // hb_interval_s, "heartbeats per second, tracking", tasks_running, "tasks")1333 heartbeats per second, tracking 40000 tasksSlots waste resources
Each node had fixed map slots and reduce slots. During a map-heavy phase, reduce slots sat idle even though maps were waiting.
Utilisation suffered, and an admin had to guess the right map/reduce split for every node.Hadoop 2 splits the JobTracker
The ResourceManager only tracks free resources and hands out containers. Each job's ApplicationMaster (running in an ordinary container on a worker) handles its own tasks.
The heavy, per-job work is now spread across the cluster. The ResourceManager stays small and fast, so clusters can grow much larger.Any engine can join
Spark, Tez and others ship their own ApplicationMaster. YARN doesn't care what runs inside a container.
This is why “Spark on YARN” is so common: one cluster, one storage layer, many engines, shared fairly through queues.
The same two jobs on Hadoop 1 and on Hadoop 2
A map-heavy job and a Spark job arrive at a 3-node cluster. Left: Hadoop 1 with a JobTracker and slots. Right: Hadoop 2 with YARN and containers.
- Hadoop 1: a single JobTracker and three TaskTrackers. Each node has 2 map slots and 2 reduce slots, fixed by configuration.
- A job with 12 map tasks arrives. Only the 6 map slots can take them.
- Six maps wait in the queue while six reduce slots sit empty: they may only run reduce tasks.
- A Spark job arrives. Hadoop 1 runs only MapReduce, so it needs a separate cluster.
- On a big cluster, the JobTracker tracks every task of every job and becomes the bottleneck and a single point of failure.
- Result: half the slots used, one engine, one overloaded master.
- Hadoop 2: a ResourceManager and three NodeManagers. Each node offers containers that can run any kind of task.
- The MapReduce job gets an ApplicationMaster (violet), which asks for containers for its map tasks.
- Four more maps start in containers that Hadoop 1 would have kept empty for reducers. Nothing is reserved for a task type that isn't running.
- The Spark job gets its own ApplicationMaster and executors (orange) on the same cluster.
- Per-job decisions are made by each ApplicationMaster, so the ResourceManager stays light and the cluster can grow.
- Every container is in use, by two different engines, on one shared cluster.
Try it yourself: Hadoop 2's two big fixes
This cluster runs Hadoop 2+ features: jobs run through the ResourceManager, and the NameNode has a standby. Try the failure that would have stopped a Hadoop 1 cluster.
Version changes in real projects
1. Upgrading from Hadoop 2 to 3
Upgrade projects check Java versions, rewrite scripts for the new shell, update firewall rules and monitoring for the new ports, test jobs on staging, and use HDFS rolling upgrades so the cluster stays available.
2. Cutting storage cost with erasure coding
Companies with years of rarely read data apply an erasure-coding policy to archive directories, roughly halving the raw disk needed for them while keeping hot data replicated.
3. Three NameNodes for critical clusters
Platforms that must keep HDFS available through maintenance and failures run one active and two standby NameNodes (Hadoop 3), so one can be patched while another still protects the cluster.
4. GPUs on YARN for machine learning
Hadoop 3.1 added GPU scheduling to YARN, so ML teams can train models on the same cluster that stores their data, requesting GPUs like memory and CPU.
5. Reading old tutorials safely
Much online material was written for Hadoop 1 or 2. Knowing the version differences lets you spot outdated advice: JobTracker commands, port 50070, 64 MB blocks, or Java 7 instructions.
Examples are simplified descriptions of common practice.
Slots vs containers: measure the waste
In Hadoop 1, each node has fixed map slots and reduce slots. This program fills them with a map-heavy workload and measures how much of the cluster is idle, then does the same with YARN-style containers that can run either kind of task.
nodes = 10
map_slots, reduce_slots = 8, 4 # Hadoop 1: fixed per node
containers = map_slots + reduce_slots # Hadoop 2: same capacity, any task type
maps_waiting, reduces_waiting = 200, 10
h1_used = min(maps_waiting, nodes * map_slots) + min(reduces_waiting, nodes * reduce_slots)
h2_used = min(maps_waiting + reduces_waiting, nodes * containers)
total = nodes * containers
print(f"Hadoop 1: {h1_used} of {total} busy ({h1_used / total:.0%})")
print(f"Hadoop 2: {h2_used} of {total} busy ({h2_used / total:.0%})")map_slots, reduce_slots = 8, 4In Hadoop 1, an admin fixed these numbers per node. A reduce slot could never run a map task.h1_used = min(...) + min(...)Map tasks can only use map slots and reduce tasks only reduce slots, so each is capped separately.h2_used = min(maps_waiting + reduces_waiting, nodes * containers)With containers, any waiting task can use any free capacity.
Placing tasks in slots vs containers, one line at a time
Watch the same five tasks being placed on one node, first with Hadoop 1 slots (2 map + 2 reduce) and then with 4 YARN containers. Notice which tasks are left waiting.
Worked examples: real problems, solved and traced in memory
Three problems from real version decisions: an upgrade checklist, the storage savings of Hadoop 3, and how many NameNodes a cluster needs. Each runs live and is traced in memory.
What must change when moving a cluster from Hadoop 2 to 3?
Problem statement
A team lists its current setup. Print an upgrade checklist: flag Java older than 8, any monitoring that uses old Hadoop 2 ports, and any job still using the Hadoop 1 JobTracker API.
java 7 · monitored ports [50070, 8088, 50075] · jobs [("daily_sales", "mapred"), ("fraud", "mapreduce")]Upgrade Java: Hadoop 3 needs Java 8 or later Monitoring: change port 50070 to 9870 Monitoring: change port 50075 to 9864 Review job 'daily_sales': uses the old mapred API
Approach
- Check the Java version number.
- Look up each monitored port in the old → new port map.
- Old-API jobs (package
org.apache.hadoop.mapred) still run, but should be reviewed.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
How much disk does erasure coding free up?
Problem statement
A cluster stores 1.2 PB of business data, all with 3× replication. The team moves the 70% that is older than a year to the RS-6-3 erasure-coding policy. How much raw storage is freed, and how many 144 TB nodes is that?
1.2 PB · 70% cold · 3× → 1.5× · 144 TB per node
Before: 3600 TB raw, after: 2340 TB raw Freed: 1260 TB = about 8 nodes
Approach
- Before: 1,200 TB × 3.
- After: hot 30% × 3 + cold 70% × 1.5.
- Freed raw TB ÷ 144 = nodes no longer needed.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
How many NameNodes and JournalNodes for a given safety level?
Problem statement
JournalNodes work by majority: with J JournalNodes the cluster tolerates (J − 1) ÷ 2 JournalNode failures. With N NameNodes (one active), it tolerates N − 1 NameNode failures. For each target, print the smallest setup that survives that many failures of each kind.
targets: survive 1 failure (Hadoop 2 style) and 2 failures (Hadoop 3 style)
Survive 1: 2 NameNodes + 3 JournalNodes (Hadoop 2 or 3) Survive 2: 3 NameNodes + 5 JournalNodes (Hadoop 3 only)
Approach
- NameNodes needed = failures + 1.
- JournalNodes needed = 2 × failures + 1 (an odd number, for a majority).
- Hadoop 2 allowed at most 2 NameNodes; Hadoop 3 allows more.
Solution: run it live
What happens in memory, step by step
Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.
Check yourself
Quick revision
Lesson 2.4 in one screen
- Hadoop 1 (2011): JobTracker + TaskTrackers, fixed map/reduce slots, MapReduce only, single NameNode, ~4,000 nodes.
- Hadoop 2 (GA Oct 2013): YARN = ResourceManager + NodeManagers + one ApplicationMaster per job; containers.
- Hadoop 2 also: NameNode HA (active + standby, JournalNodes, ZooKeeper failover), Federation, 128 MB blocks.
- Many engines on one cluster: MapReduce, Spark, Tez, Flink.
- Hadoop 3 (GA Dec 2017): erasure coding (RS-6-3 ≈ 1.5×), 2+ standby NameNodes, Java 8+, new ports.
- Hadoop 3 YARN: Timeline v2, opportunistic containers, GPUs/FPGAs (3.1), Docker; Router-based Federation.
- Ports: NameNode UI 50070 → 9870; DataNode 50010 → 9866, 50075 → 9864; Secondary 50090 → 9868; RM UI 8088 unchanged.
- Recent: 3.3 (2020, Java 11 runtime, ARM), 3.4.0 (2024), 3.5.0 (Apr 2026, servers need JDK 17).
Interview and viva questions
What are the differences between Hadoop 1 and Hadoop 2?
Hadoop 1 used a single JobTracker for both resource management and job scheduling, with TaskTrackers offering fixed map and reduce slots, ran only MapReduce, had a single NameNode (a SPOF) and scaled to about 4,000 nodes. Hadoop 2 introduced YARN: a ResourceManager for cluster resources, NodeManagers on each node, and an ApplicationMaster per job, using flexible containers. It supports engines beyond MapReduce, adds NameNode High Availability and HDFS Federation, scales further and uses a 128 MB default block size.
What new features came in Hadoop 3?
HDFS erasure coding (about 1.5× storage overhead instead of 3× for suitable data), support for more than two NameNodes, a minimum of Java 8, default ports moved out of the ephemeral range (NameNode UI on 9870), a rewritten shell, YARN Timeline Service v2, opportunistic containers, resource types such as GPUs and FPGAs (3.1), Docker container support, Router-based Federation, an intra-DataNode disk balancer and much improved cloud storage connectors.
Why was the JobTracker a bottleneck?
It received heartbeats from every TaskTracker, scheduled every task of every job, tracked their progress and counters, and kept job history in memory. As clusters and job counts grew, one process could not keep up, and if it failed all running jobs were lost.
Is the Secondary NameNode a backup NameNode?
No. It periodically merges the NameNode's edit log into the fsimage (checkpointing) so the edit log does not grow forever and restarts are faster. It cannot take over if the NameNode fails. Automatic failover requires HA with a standby NameNode.
What is the difference between replication and erasure coding?
Replication stores full copies of each block (3× storage) and reads are simple and fast. Erasure coding splits data into data cells and computes parity cells (for example 6 + 3); any 6 of the 9 cells can rebuild the data. It needs about 1.5× storage but costs CPU and network to encode and rebuild, so it is best for cold, large files.
Practice problems
Questions that test version knowledge with small programs: slots, ports, storage schemes and HA sizing.
Total slots in Hadoop 1
A Hadoop 1 cluster has 50 nodes with 6 map and 3 reduce slots each. How many map and reduce slots in total?
50 nodes · 6 map + 3 reduce
map: 300 | reduce: 150
Show solution and explanation
print("map:", 50 * 6, "| reduce:", 50 * 3)How it works: 300 map and 150 reduce slots. If no reduce tasks are running, those 150 slots do nothing.
Erasure coding overhead
Print the storage overhead of RS-6-3 and RS-3-2 erasure coding.
RS-6-3 · RS-3-2
RS-6-3: 1.50x RS-3-2: 1.67x
Show solution and explanation
for d, p in [(6, 3), (3, 2)]:
print(f"RS-{d}-{p}: {(d + p) / d:.2f}x")How it works: 1.50× and 1.67×. Both are well below the 3× of replication; RS-6-3 is the default policy.
Port lookup
Write code that prints the Hadoop 3 port for the NameNode web UI, given a dictionary of services.
{"namenode-ui": 9870, "rm-ui": 8088, "datanode-ui": 9864}Open http://localhost:9870
Show solution and explanation
ports = {"namenode-ui": 9870, "rm-ui": 8088, "datanode-ui": 9864}
print("Open http://localhost:" + str(ports["namenode-ui"]))How it works: On a fresh Hadoop 3 install, the NameNode UI is at http://localhost:9870 and YARN at http://localhost:8088.
Idle slots during a map phase
A Hadoop 1 cluster has 400 map slots and 200 reduce slots. 1,000 maps are waiting and no reduces. What percentage of all slots is idle? What would it be with 600 general containers?
400 map + 200 reduce slots · 1000 maps waiting
Hadoop 1 idle: 33% Hadoop 2 idle: 0%
Show solution and explanation
total = 400 + 200
used_h1 = min(1000, 400)
used_h2 = min(1000, total)
print(f"Hadoop 1 idle: {(total - used_h1) / total:.0%}")
print(f"Hadoop 2 idle: {(total - used_h2) / total:.0%}")How it works: A third of the cluster idles in Hadoop 1 while maps queue up; YARN uses it all.
Survivable JournalNode failures
For 3, 4, 5 and 7 JournalNodes, print how many failures a majority-based system survives.
[3, 4, 5, 7]
3 JournalNodes survive 1 failure(s) 4 JournalNodes survive 1 failure(s) 5 JournalNodes survive 2 failure(s) 7 JournalNodes survive 3 failure(s)
Show solution and explanation
for j in [3, 4, 5, 7]:
print(j, "JournalNodes survive", (j - 1) // 2, "failure(s)")How it works: 3 → 1, 4 → 1, 5 → 2, 7 → 3. Even numbers add cost but no extra safety, which is why JournalNodes come in odd numbers.
Map features to versions
Given a list of features, print the ones that would NOT exist on a Hadoop 2 cluster.
["YARN", "erasure coding", "NameNode HA", "GPU scheduling", "Federation"]
['erasure coding', 'GPU scheduling']
Show solution and explanation
hadoop3_only = {"erasure coding", "GPU scheduling", "multiple standby NameNodes"}
features = ["YARN", "erasure coding", "NameNode HA", "GPU scheduling", "Federation"]
print([f for f in features if f in hadoop3_only])How it works: Erasure coding and GPU scheduling need Hadoop 3. YARN, HA and Federation arrived in Hadoop 2.
Should we upgrade to Hadoop 3 for storage savings?
A 2 PB cluster (raw) is full. 60% of the stored data is cold. Switching cold data from 3× replication to 1.5× erasure coding frees raw disk. The alternative is buying new nodes of 144 TB at Rs 18 lakh each. How much hardware spending does the upgrade avoid?
2,048 TB raw · 60% cold · node 144 TB = Rs 18 lakh
Freed 614 TB raw = 4 nodes = Rs 72 lakh avoided
Show solution and explanation
import math
raw = 2048
data = raw / 3
cold = data * 0.60
freed = cold * 3 - cold * 1.5
nodes = math.floor(freed / 144)
print(f"Freed {freed:.0f} TB raw = {nodes} nodes = Rs {nodes * 18} lakh avoided")How it works: About 614 TB freed, 4 nodes (Rs 72 lakh) not bought, using illustrative prices. Weigh it against upgrade effort and the CPU cost of erasure coding.
Consolidate separate MapReduce and Spark clusters
A company runs a 40-node Hadoop 1 cluster for MapReduce and a separate 30-node cluster for Spark. Peak usage is 30 nodes and 20 nodes, at different times of day. With one YARN cluster, the worst-case need is the larger peak plus a quiet share of 6 nodes from the other, plus 20% spare. How many nodes are needed?
peaks 30 and 20 at different times · quiet share 6 · +20%
Nodes needed: 44 instead of 70
Show solution and explanation
import math
need = max(30, 20) + 6
print("Nodes needed:", math.ceil(need * 1.2), "instead of", 40 + 30)How it works: 44 instead of 70 nodes. Sharing one cluster across engines was a major business reason for YARN.
Real-world scenario questions (asked in company interviews)
Version questions show up in almost every Hadoop interview. These scenarios turn the comparison table into practical answers.
“Explain the difference between Hadoop 1 and 2 in two minutes.”
The classic question. The interviewer wants the main differences and the reason behind them.
The interviewer is checking: do you know why YARN exists, not just its name?
Show a strong answer
- Problem: in Hadoop 1, one JobTracker did resource management and scheduled every task of every job. It limited clusters to about 4,000 nodes, was a single point of failure, used fixed map/reduce slots (wasting capacity) and could only run MapReduce.
- Fix (Hadoop 2): YARN split it: the ResourceManager manages resources; each job has its own ApplicationMaster; NodeManagers run flexible containers. Result: bigger clusters, better utilisation, and Spark, Tez and others on the same cluster.
- Also in Hadoop 2: NameNode HA (active + standby) and Federation.
Avoid: saying “Hadoop 2 removed MapReduce”. MapReduce still exists; it runs as a YARN application.
“The NameNode web page won't open”
A colleague installed Hadoop 3.4 from a tutorial and says HDFS is running, but http://localhost:50070 shows “connection refused”.
The interviewer is checking: do you know the practical version differences?
Show a strong answer
- Hadoop 3 moved the NameNode UI to 9870. Try
http://localhost:9870. - Confirm with
jpsthat the NameNode process is running, and checkdfs.namenode.http-addressinhdfs-site.xml. - The tutorial was probably written for Hadoop 2: double-check its other settings too (Java version, script names, ports for DataNodes).
Avoid: reinstalling Hadoop before checking the port.
Plan an upgrade from Hadoop 2.10 to 3.x
Your company runs a 60-node Hadoop 2.10 cluster with Hive and Spark jobs. Management wants it on a current 3.x release with minimal downtime.
The interviewer is checking: can you think through compatibility and risk, not just “install the new version”?
Show a strong answer
- Inventory: Java version, every job and its libraries (Hive, Spark, custom jars), scripts using old shell behaviour, monitoring and firewalls using old ports.
- Compatibility: pick a 3.x release supported by your Hive and Spark versions; upgrade Java first.
- Staging: build a staging cluster on the target version and run real jobs on copies of data.
- Upgrade: back up NameNode metadata, use an HA rolling upgrade for HDFS where supported, then YARN, keeping a rollback path until finalised.
- After: update ports in monitoring, then consider Hadoop 3 features like erasure coding for cold data.
Avoid: upgrading production directly, or enabling erasure coding everywhere on day one.
Two NameNodes or three?
A bank's HDFS cluster uses HA with two NameNodes. Last month, while the standby was down for patching, the active NameNode's server failed, and HDFS was unavailable for an hour.
The interviewer is checking: do you know what Hadoop 3 added for availability and how quorums work?
Show a strong answer
- With two NameNodes, maintenance on one leaves no protection. Hadoop 3 supports more than two NameNodes: with one active and two standbys, one can be patched while another still protects the cluster.
- Pair it with five JournalNodes (a majority of 3 must be alive) to tolerate two JournalNode failures as well.
- Run the NameNodes on different racks and power feeds, and schedule maintenance one node at a time.
Avoid: “Use the Secondary NameNode as a third backup.” It cannot take over.