“What is actually running on these machines?”
Kabir's team lead gives him login access to the company's Hadoop cluster and one task: “Find out what is running on each machine, and on which port.” Kabir logs in to the first server, types jps, and sees a short list of strange names: NameNode, ResourceManager, JournalNode. On the next server: DataNode, NodeManager. He calls Riya: “It's like a zoo of Java programs.”
A zoo? I thought Hadoop was one program.
That's the most common mistake, Riya. Hadoop is a set of long-running Java programs, called daemons, spread over the cluster. Each one has one job. Some run on one or two master machines; others run on every worker.
So the NameNode on server 1 is the HDFS master, and the DataNodes on the other servers are the HDFS workers?
Yes. Same for YARN: one ResourceManager, a NodeManager on every worker. And there are helpers: JournalNodes, the JobHistory server, ZooKeeper.
And how do they know about each other?
Through a handful of XML configuration files that every node shares. Today we'll open up a real cluster layer by layer: which daemon runs where, what it does, which port it listens on, and which configuration file controls it. After this lesson, jps output will read like a sentence to you.
Hadoop's architecture, daemon by daemon
A Hadoop cluster is a layered, master–worker system of long-running Java processes (daemons). The storage layer (HDFS) consists of a NameNode, which manages the namespace and block map, and DataNodes, which store blocks; with High Availability it adds a standby NameNode, JournalNodes and ZKFailoverControllers. The resource layer (YARN) consists of a ResourceManager, which allocates containers cluster-wide, and NodeManagers, which launch and monitor containers on each worker. The processing layer consists of applications such as MapReduce, each run by its own ApplicationMaster; the JobHistory Server keeps records of finished MapReduce jobs. Hadoop Common provides the shared libraries, RPC, configuration and security on which all daemons are built. Daemons communicate through RPC and periodic heartbeats and are configured through core-site.xml, hdfs-site.xml, yarn-site.xml and mapred-site.xml.
Hadoop is not one program but a team of programs. On the master machines run the “managers”: the NameNode (knows where every file block is) and the ResourceManager (decides who gets CPU and memory). On every worker run two “staff members”: a DataNode (stores blocks) and a NodeManager (runs tasks). They talk to each other all the time, and four XML files tell each of them where the others are.
Words you'll meet in this lesson
core-site.xml that tells every client and daemon where the NameNode is, e.g. hdfs://nn1:8020.Every daemon, where it runs, and its default ports (Hadoop 3)
| Daemon | Layer | Runs on | Main job | Ports |
|---|---|---|---|---|
| NameNode | HDFS | Master (1 active) | Namespace + block locations | 8020 RPC · 9870 web UI |
| DataNode | HDFS | Every worker | Store and serve blocks | 9866 data · 9867 IPC · 9864 web |
| Secondary NameNode | HDFS | A master (non-HA only) | Checkpoints fsimage | 9868 web |
| JournalNode | HDFS (HA) | 3 or 5 masters | Shared edit log | 8485 RPC · 8480 web |
| ZKFC | HDFS (HA) | Next to each NameNode | Automatic failover | 8019 |
| ResourceManager | YARN | Master | Allocate containers | 8032 clients · 8030 AMs · 8031 NMs · 8088 web |
| NodeManager | YARN | Every worker | Launch and watch containers | 8042 web · 13562 shuffle |
| JobHistory Server | MapReduce | A master or utility node | History of finished jobs | 10020 IPC · 19888 web |
| ZooKeeper | Coordination (separate project) | 3 or 5 nodes | Leader election for HA | 2181 |
These are Apache Hadoop 3 defaults. Distributions and companies often change them; always check the cluster's configuration files.
The architecture at three levels
Beginner A hospital
- The records office (NameNode) knows which file is in which cupboard, but holds no files itself.
- The cupboards in every ward (DataNodes) hold the actual files, with copies in other wards.
- The bed manager (ResourceManager) decides which patient gets which bed and how many nurses.
- Each ward's in-charge (NodeManager) sets up the beds the bed manager approved and reports back.
- Each patient's doctor (ApplicationMaster) plans that one patient's treatment and asks for beds as needed.
- The hospital rule book (Common + config files) is the same in every ward.
Intermediate How the daemons talk to each other
- DataNode → NameNode: registration, heartbeats every 3 s, block reports. The NameNode answers with commands (copy, delete).
- NodeManager → ResourceManager: heartbeats with free memory/CPU and container status. The RM answers with containers to start or kill.
- Client → NameNode: “create this file”, “where are the blocks of that file?”. Client → DataNodes: the actual bytes. The NameNode never carries file data.
- Client → ResourceManager: submit an application. ApplicationMaster → RM: ask for containers. AM → NodeManagers: start containers.
- Reducers → NodeManagers' shuffle service: fetch map outputs over HTTP.
Advanced Design details that matter in production
- Masters are out of the data path: clients read and write blocks directly from DataNodes, so the NameNode handles only small metadata calls. That's how one NameNode serves thousands of nodes.
- Control vs data traffic: RPC (small, frequent) and data transfer (large, streaming) use different ports and can be tuned separately.
- Co-location: DataNode and NodeManager on the same worker make data locality possible. Separating them (compute-only nodes) is possible but loses locality.
- Same configuration everywhere: the XML files are usually managed centrally (Ambari, Cloudera Manager, Ansible) and pushed to every node; a mismatch is a classic source of strange errors.
- Each daemon has its own log under
$HADOOP_HOME/logs(for examplehadoop-<user>-namenode-<host>.log), which is the first place to look when something fails.
Exam tip: For “Explain the architecture of Hadoop with a neat diagram”, draw two master–worker pairs: NameNode ↔ DataNodes (HDFS) and ResourceManager ↔ NodeManagers (YARN), show a client talking to the NameNode for metadata but to DataNodes for data, add one ApplicationMaster inside a NodeManager, and label heartbeats. Mention Hadoop Common underneath.
The four modules, their daemons and their configuration files
Hadoop Common
No daemon of its own. Libraries used by all others: the FileSystem API, RPC, security (Kerberos), metrics, the hadoop command.
HDFS
NameNode, DataNodes, plus Secondary NameNode (non-HA) or JournalNodes + ZKFCs (HA). Commands: hdfs dfs, hdfs dfsadmin.
YARN
ResourceManager, NodeManagers (and optionally a Timeline Server). Commands: yarn application, yarn node.
MapReduce
No permanent daemon per job: each job's MRAppMaster runs in a container. The JobHistory Server keeps finished-job records. Command: mapred.
The most important settings in each file
| File | Key property | Example value | Meaning |
|---|---|---|---|
core-site.xml | fs.defaultFS | hdfs://nn1:8020 | Where the default file system (NameNode) is |
hdfs-site.xml | dfs.replication | 3 | Copies of each block |
hdfs-site.xml | dfs.namenode.name.dir | /data/nn | Where the NameNode saves its metadata |
hdfs-site.xml | dfs.datanode.data.dir | /data/1/dn,/data/2/dn | Disks where a DataNode stores blocks |
yarn-site.xml | yarn.resourcemanager.hostname | rm1 | Where the ResourceManager is |
yarn-site.xml | yarn.nodemanager.aux-services | mapreduce_shuffle | Turns on the shuffle service for MapReduce |
yarn-site.xml | yarn.nodemanager.resource.memory-mb | 196608 | Memory a node offers to containers |
mapred-site.xml | mapreduce.framework.name | yarn | Run MapReduce jobs on YARN |
workers | (plain list) | one host per line | Where start scripts launch DataNodes and NodeManagers (called slaves in Hadoop 2) |
When a client says “Connection refused” to localhost:8020 or similar, check fs.defaultFS first. Half of all beginner Hadoop errors are a wrong host name or port in core-site.xml, or a daemon that is simply not running (check with jps).
Bringing a cluster up, daemon by daemon
Every node gets the same configuration
Every Hadoop configuration file is a list ofimport xml.etree.ElementTree as ET xml = """<configuration><property><name>fs.defaultFS</name> <value>hdfs://nn1:8020</value></property></configuration>""" for p in ET.fromstring(xml).iter("property"): print(p.findtext("name"), "=", p.findtext("value"))fs.defaultFS = hdfs://nn1:8020<property>name–value pairs. Every daemon and client reads them at start-up, so they all agree on where the masters are.Start HDFS: the NameNode first
The admin runs
The NameNode knows the files and their blocks, but not yet where the blocks are. That information is never saved; it comes fresh from the DataNodes.start-dfs.sh. The NameNode loads its saved metadata (fsimage + edit log) and waits in safe mode.DataNodes start and report
On each worker a DataNode starts, registers with the NameNode and sends a block report.
When enough blocks have been reported (99.9% by default), the NameNode leaves safe mode and allows writes. Module 5 explains safe mode in detail.Start YARN
The admin runs
The RM now knows total cluster capacity, for example 40 nodes × 192 GB. Its web UI on port 8088 shows it.start-yarn.sh. The ResourceManager starts; each NodeManager registers with how much memory and how many vcores it offers.Start the JobHistory Server, then check
On a single-machine (pseudo-distributed) test cluster,mapred --daemon start historyserver jpsjpsshould list NameNode, DataNode, SecondaryNameNode, ResourceManager, NodeManager and JobHistoryServer. If one is missing, its log file says why. You'll do this yourself in Module 4.
A cluster starting up: what the admin sees, and which daemons appear
Follow a small cluster (one master, three workers) from power-on to ready. Left: the admin's terminal. Right: the daemons on each machine.
- Before start-up,
jpsshows only itself: no Hadoop daemons are running. start-dfs.shstarts the NameNode on the master, a DataNode on each host in theworkersfile, and the Secondary NameNode.- The NameNode starts in safe mode (read-only) until enough DataNodes have reported their blocks, then leaves it.
start-yarn.shstarts the ResourceManager and a NodeManager on every worker.- The JobHistory Server starts.
jpson the master now lists all master daemons (PIDs differ on every machine). - The web UIs confirm 3 live DataNodes and 3 active NodeManagers. Jobs can run.
- Four machines are powered on, but no Hadoop daemon is running yet.
- HDFS starts: the NameNode and Secondary NameNode on the master, one DataNode per worker.
- Each DataNode registers and sends a block report. The NameNode builds its map of block locations in memory.
- YARN starts: the ResourceManager on the master and a NodeManager next to each DataNode. Each NodeManager tells the RM how much memory and CPU it can offer.
- The JobHistory Server joins the master. Typical small layout: 4 daemons on the master, 2 on each worker.
- Both layers are running. Clients can now store files and submit jobs.
Try it yourself: find each daemon in the playground
The playground shows the same architecture: masters at the top, DataNodes (with their NodeManager containers) below.
Architecture knowledge in daily work
1. First check in any incident
When jobs fail on one node, an engineer logs in and runs jps. If the NodeManager is missing, the node offers no containers; if the DataNode is missing, its blocks are unavailable. The daemon's log file then explains why.
2. Firewall and security reviews
Security teams ask exactly which ports each node needs open. The daemon-and-port table in this lesson is what platform engineers hand them, with web UIs restricted to admin networks.
3. Cluster managers show the same picture
Management tools like Apache Ambari or Cloudera Manager display every host with its roles (NameNode, DataNode, NodeManager…), their health and their configuration, the same architecture you learned today with a dashboard on top.
4. Connecting tools to the cluster
Spark, Hive, Airflow and BI tools need the cluster's core-site.xml and hdfs-site.xml (and yarn-site.xml to submit jobs). Copying these files to an edge node is how new tools are connected.
5. Capacity and health dashboards
Monitoring systems scrape metrics from each daemon (NameNode heap, DataNode disk, NodeManager memory) and graph them per layer, so teams see whether storage or compute is running out.
Examples are simplified. Port numbers are Apache defaults; distributions may differ.
Read a Hadoop configuration file
Every Hadoop setting lives in XML files like this hdfs-site.xml. This program reads it the way Hadoop does and turns it into a dictionary. Then try the challenges: find the NameNode, plan which daemons go on which host, and catch a configuration mistake.
import xml.etree.ElementTree as ET
hdfs_site = """<configuration>
<property><name>dfs.replication</name><value>3</value></property>
<property><name>dfs.namenode.name.dir</name><value>/data/nn</value></property>
<property><name>dfs.datanode.data.dir</name><value>/data/1/dn,/data/2/dn</value></property>
<property><name>dfs.blocksize</name><value>134217728</value></property>
</configuration>"""
conf = {p.findtext("name"): p.findtext("value")
for p in ET.fromstring(hdfs_site).iter("property")}
print("Replication :", conf["dfs.replication"])
print("Block size :", int(conf["dfs.blocksize"]) // 1024 // 1024, "MB")
print("DataNode disks:", conf["dfs.datanode.data.dir"].split(","))ET.fromstring(hdfs_site).iter("property")Parse the XML and visit every<property>element, as Hadoop'sConfigurationclass does.conf = {p.findtext("name"): p.findtext("value") ...}A dictionary comprehension: property name → value. All values are strings.int(conf["dfs.blocksize"]) // 1024 // 1024134217728 bytes = 128 MB, the Hadoop 2/3 default.
Merging configuration files, one line at a time
Hadoop loads default settings first and then the site files, so later files override earlier ones. Watch the conf dictionary change as each layer is applied.
Worked examples: real problems, solved and traced in memory
Three tasks a new platform engineer is given in the first week: audit which daemons run where, check a cluster's port plan, and size the master's memory. Each runs live and is traced in memory.
Which nodes are missing a daemon?
Problem statement
A script collects jps output from every node. Masters must run NameNode and ResourceManager; workers must run DataNode and NodeManager. Print each node's missing daemons.
master1: NameNode, ResourceManager · w1: DataNode, NodeManager · w2: DataNode · w3: NodeManager
w2 missing ['NodeManager'] w3 missing ['DataNode']
Approach
- Store the expected daemons per role as sets.
- For each node, subtract what is running from what is expected.
- Print the node only if something is missing.
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.
Which ports must be open on each kind of node?
Problem statement
Using the Hadoop 3 default ports, print the ports each kind of node must open: an HDFS+YARN master and a worker. Mark web UIs separately so security can restrict them to the admin network.
master daemons: NameNode, ResourceManager · worker daemons: DataNode, NodeManager
master: service [8020, 8030, 8031, 8032] | web UI [8088, 9870] worker: service [9866, 9867, 13562] | web UI [8042, 9864]
Approach
- Map each daemon to its ports, tagging web UIs.
- For each node type, collect the ports of its daemons.
- Print service ports and web UI ports separately.
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 heap does the NameNode need?
Problem statement
A common rule of thumb is that the NameNode needs roughly 1 GB of heap per million files, directories and blocks, plus headroom. A cluster has 40 million files averaging 1.5 blocks each and 3 million directories. Estimate the heap, add 30% headroom, and round up to the next 8 GB.
40 M files × 1.5 blocks · 3 M directories · ~1 GB per million objects · +30%
Objects: 103 million Heap with headroom: 134 GB -> set 136 GB
Approach
- Objects = files + blocks + directories.
- Heap ≈ objects in millions × 1 GB.
- Add 30%, then round up to a multiple of 8 GB.
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 3.1 in one screen
- Hadoop = a team of Java daemons, not one program.
- HDFS: NameNode (metadata, 8020 RPC, 9870 UI) + DataNodes (blocks, 9866/9867/9864).
- HA helpers: JournalNodes (8485), ZKFC (8019), ZooKeeper (2181). Non-HA: Secondary NameNode (9868).
- YARN: ResourceManager (8032/8030/8031, UI 8088) + NodeManagers (UI 8042, shuffle 13562).
- MapReduce: one ApplicationMaster per job in a container; JobHistory Server (19888) for finished jobs.
- Worker = DataNode + NodeManager (locality). Masters stay out of the data path.
- Config:
core-site.xml(fs.defaultFS),hdfs-site.xml,yarn-site.xml,mapred-site.xml,workers. - Start order:
start-dfs.sh→ safe mode exit →start-yarn.sh→ history server. Check withjps.
Interview and viva questions
What are the daemons in a Hadoop cluster?
HDFS: NameNode, DataNodes, and either a Secondary NameNode (non-HA) or a standby NameNode with JournalNodes and ZKFailoverControllers (HA). YARN: ResourceManager and NodeManagers (optionally a Timeline Server). MapReduce: a per-job MRAppMaster running in a container and the JobHistory Server. ZooKeeper is a separate service used for HA.
Why does the NameNode not handle file data?
Keeping the master out of the data path means it only answers small metadata requests (open, create, block locations), while the large data transfers happen directly between clients and DataNodes in parallel. This lets one NameNode serve thousands of DataNodes without becoming a bandwidth bottleneck.
What is in core-site.xml, hdfs-site.xml, yarn-site.xml and mapred-site.xml?
core-site.xml: settings shared by all components, most importantly fs.defaultFS. hdfs-site.xml: HDFS settings such as dfs.replication, dfs.blocksize, NameNode and DataNode directories, HA settings. yarn-site.xml: ResourceManager address, NodeManager resources, aux-services, scheduler. mapred-site.xml: mapreduce.framework.name=yarn and MapReduce tuning such as memory and the number of reducers.
How do you check whether Hadoop daemons are running?
Run jps on each node to see the Java processes; use hdfs dfsadmin -report for live and dead DataNodes; yarn node -list for NodeManagers; and open the web UIs (NameNode 9870, ResourceManager 8088). If a daemon is missing, read its log in $HADOOP_HOME/logs.
Why do DataNode and NodeManager run on the same machine?
So that tasks launched by the NodeManager can read blocks stored by the local DataNode. This co-location is what makes data locality, and therefore Hadoop's performance, possible.
Practice problems
Small programs about daemons, ports and configuration: the things you check every day on a real cluster.
Port to service
Given a port number, print which Hadoop 3 service uses it. Test with 9870, 8088 and 19888.
[9870, 8088, 19888]
9870 -> NameNode web UI 8088 -> ResourceManager web UI 19888 -> JobHistory web UI
Show solution and explanation
service = {9870: "NameNode web UI", 8088: "ResourceManager web UI", 19888: "JobHistory web UI",
8020: "NameNode RPC", 9864: "DataNode web UI"}
for p in [9870, 8088, 19888]:
print(p, "->", service[p])How it works: Memorise these five ports: they come up in every installation and troubleshooting session.
Count daemons in a cluster
A cluster has 2 master nodes (each running 3 daemons) and 40 workers (each running 2). How many daemon processes in total?
2 × 3 + 40 × 2
86 daemons
Show solution and explanation
print(2 * 3 + 40 * 2, "daemons")How it works: 86 long-running processes, each with its own log file and memory settings.
Block size from bytes
Convert the dfs.blocksize values 134217728 and 268435456 to MB.
["134217728", "268435456"]
134217728 = 128 MB 268435456 = 256 MB
Show solution and explanation
for v in ["134217728", "268435456"]:
print(v, "=", int(v) // (1024 * 1024), "MB")How it works: 128 MB and 256 MB. Hadoop also accepts values like 128m or 256m in configuration.
Parse fs.defaultFS
From these fs.defaultFS values, print host and port. If no port is given, HDFS uses 8020.
["hdfs://nn1:8020", "hdfs://localhost:9000", "hdfs://mycluster"]
hdfs://nn1:8020 -> nn1 8020 hdfs://localhost:9000 -> localhost 9000 hdfs://mycluster -> mycluster 8020
Show solution and explanation
from urllib.parse import urlparse
for v in ["hdfs://nn1:8020", "hdfs://localhost:9000", "hdfs://mycluster"]:
u = urlparse(v)
print(v, "->", u.hostname, u.port or 8020)How it works: hdfs://mycluster with no port is how HA clusters are addressed: mycluster is a logical name that maps to both NameNodes in hdfs-site.xml.
Override order
Apply configuration layers in order (defaults, site, job) and print the final replication and block size.
defaults {repl 3, block 128m} · site {repl 2} · job {block 256m}{'dfs.replication': '2', 'dfs.blocksize': '256m'}Show solution and explanation
layers = [{"dfs.replication": "3", "dfs.blocksize": "128m"},
{"dfs.replication": "2"},
{"dfs.blocksize": "256m"}]
conf = {}
for layer in layers:
conf.update(layer)
print(conf)How it works: Later layers win. Administrators can mark a property <final>true</final> in site files so jobs cannot override it.
Live vs dead DataNodes
Given each DataNode's seconds since last heartbeat, print live and dead counts using the 630-second rule.
{dn1: 2, dn2: 700, dn3: 1, dn4: 640, dn5: 3}Live: 3 | Dead: 2 ['dn2', 'dn4']
Show solution and explanation
last = {"dn1": 2, "dn2": 700, "dn3": 1, "dn4": 640, "dn5": 3}
dead = [n for n, s in last.items() if s > 630]
print("Live:", len(last) - len(dead), "| Dead:", len(dead), dead)How it works: This is the number at the top of the NameNode web UI and of hdfs dfsadmin -report.
Memory budget for a worker
A worker has 256 GB RAM. Reserve 8 GB for the OS, 4 GB for the DataNode and 2 GB for the NodeManager. How much can YARN offer to containers, and how many 4 GB containers fit?
256 GB · OS 8 · DN 4 · NM 2 · containers 4 GB
yarn.nodemanager.resource.memory-mb = 247808 4 GB containers per node: 60
Show solution and explanation
total, os_gb, dn, nm = 256, 8, 4, 2
yarn_gb = total - os_gb - dn - nm
print("yarn.nodemanager.resource.memory-mb =", yarn_gb * 1024)
print("4 GB containers per node:", yarn_gb // 4)How it works: 242 GB for YARN, 60 containers of 4 GB. Giving YARN all the memory starves the daemons and the OS; Module 11 covers tuning.
Master heap budget
The NameNode needs about 1 GB per million objects. The cluster has 120 million objects and grows 25% a year. What heap is needed now and in 2 years (with 30% headroom)?
120 M objects · +25%/year · +30%
Year 0: ~156 GB NameNode heap Year 2: ~244 GB NameNode heap
Show solution and explanation
objects_m = 120
for year in [0, 2]:
need = objects_m * 1.25 ** year * 1.3
print(f"Year {year}: ~{need:.0f} GB NameNode heap")How it works: About 156 GB now and 244 GB in two years. Very large heaps make Java garbage collection pauses longer, one reason teams use federation or compact small files.
Real-world scenario questions (asked in company interviews)
Architecture questions in interviews are usually practical: what runs where, how they talk, and what you check when something breaks.
Jobs never use one of the workers
The HDFS UI shows 10 live DataNodes, but the YARN UI shows only 9 active NodeManagers. Jobs never run tasks on worker w7.
The interviewer is checking: do you know that storage and compute are separate daemons on the same node?
Show a strong answer
- On
w7, runjps: the DataNode is running but the NodeManager isn't (or it is unhealthy). - Read the NodeManager log under
$HADOOP_HOME/logs: common causes are a wrongyarn.resourcemanager.hostname, a full local disk (marked unhealthy), or a memory setting larger than the machine. - Fix and start it:
yarn --daemon start nodemanager, then confirm withyarn node -list.
Avoid: restarting the whole cluster for one missing daemon.
“Does all data go through the NameNode?”
The interviewer says: “If the NameNode is the master, surely every byte you read passes through it, right?”
The interviewer is checking: do you understand why masters stay out of the data path?
Show a strong answer
- No. The client asks the NameNode only for metadata: which blocks make up the file and which DataNodes hold them.
- The client then reads (or writes) the bytes directly from the DataNodes, choosing the closest replica.
- This keeps the NameNode's work small and lets thousands of clients transfer data in parallel. The same is true of YARN: the ResourceManager hands out containers but never touches job data.
Avoid: drawing data arrows through the NameNode in an architecture diagram.
Spark on the edge node can't find HDFS
A data scientist installs Spark on a new edge node. spark.read.csv("/data/sales") fails with “File does not exist” even though hdfs dfs -ls /data/sales works on other nodes.
The interviewer is checking: do you know how clients find the cluster?
Show a strong answer
- Spark doesn't know the cluster: without
core-site.xml, the default file system is the local disk (file:///), so/data/salesis looked up locally. - Copy the cluster's
core-site.xml,hdfs-site.xmlandyarn-site.xmlto the edge node and pointHADOOP_CONF_DIR(and Spark) at them, or use a full URI likehdfs://nn1:8020/data/sales. - In a managed cluster, add the node as a “gateway” host so the manager keeps the client configuration in sync.
Avoid: copying the data to the edge node.
Put the NameNode and ResourceManager on one server?
To save money on a new 30-node cluster, someone proposes running the NameNode, ResourceManager, JobHistory Server and also a DataNode on one master server.
The interviewer is checking: do you understand the resource needs and failure impact of master daemons?
Show a strong answer
- For small clusters, NameNode + ResourceManager + JobHistory on one well-equipped master is common and acceptable.
- But not a DataNode/NodeManager on the master: tasks would compete with the NameNode for memory and disk, and a runaway task could slow or crash the master.
- Separate the masters as the cluster grows (NameNode heap needs grow with files), and add HA (a second master, JournalNodes on three machines) when uptime matters.
Avoid: treating master servers like ordinary workers.