This is article 4 in the Big Data series. After completing XML configuration and SSH passwordless, formally start the three-node Hadoop cluster and verify via Web UI.

Complete illustrated version: CSDN Original | Juejin

Node Roles

NodeRole
h121NameNode, DataNode, NodeManager
h122DataNode, NodeManager
h123SecondaryNameNode, DataNode, ResourceManager, NodeManager

Step 1: Format NameNode (Execute Only Once)

# Execute on h121
hdfs namenode -format

Note: Formatting clears all data, only execute on first time or when reset needed.

Step 2: Single Node Verification (Optional)

Manually start NameNode and DataNode on h121 to verify configuration is correct:

hadoop-daemon.sh start namenode
hadoop-daemon.sh start datanode

Access HDFS Web UI: http://h121.wzk.icu:50070/dfshealth.html

After verification, stop single node services:

hadoop-daemon.sh stop namenode
hadoop-daemon.sh stop datanode

Step 3: Cluster Startup

Execute on h121 (where NameNode is located):

# Start HDFS (NameNode + all DataNodes)
start-dfs.sh

# Start YARN (ResourceManager + all NodeManagers)
start-yarn.sh

Verify Cluster Status

jps Check Processes

Run jps on each node, expected output:

# h121
NameNode
DataNode
NodeManager

# h122
DataNode
NodeManager

# h123
SecondaryNameNode
DataNode
ResourceManager
NodeManager

Web UI

  • HDFS Status: http://h121.wzk.icu:50070/dfshealth.html
    • Live Nodes shows 3 means all three DataNodes are online
  • YARN Cluster: http://h123.wzk.icu:8088/cluster
    • Active Nodes shows 3 means normal

Stop Cluster

stop-dfs.sh
stop-yarn.sh

Security Note

For public network deployment: Configure firewall whitelist for Web UI ports (50070, 8088) to avoid unauthorized access.

Next article: Big Data 05 - Cluster WordCount Practice