Starting the Hadoop Cluster
The following operations must be performed in sequence.
- Start the ZooKeeper cluster.
Start ZooKeeper on agent1, agent2, and agent3.
1 2
cd /usr/local/zookeeper/bin ./zkServer.sh start
- Check whether the ZooKeeper cluster is successfully started.Run the jps command to check whether the QuorumPeerMain process exists. If it exists, the ZooKeeper cluster is started successfully.
1jps | grep QuorumPeerMain
- Start JournalNode.
- Check whether JournalNode is successfully started.
Run the jps command to check whether the JournalNode process exists. If it exists, JournalNode is started successfully.

- Format HDFS.
- Format HDFS on server1.
1hdfs namenode -format
- After the formatting, the cluster generates a directory based on the hadoop.tmp.dir parameter configured in the core-site.xml file.
The directory configured in this example is /home/hadoop_tmp_dir.
- Format HDFS on server1.
- Format ZKFC.
Format ZKFC on server1.
1hdfs zkfc -formatZK
- Start the HDFS.
Start HDFS on server1.
1 2
cd /usr/local/hadoop/sbin ./start-dfs.sh
- Start Yarn.
Start Yarn on server1.
1 2
cd /usr/local/hadoop/sbin ./start-yarn.sh
- Check whether all processes are started properly.
Perform this operation on each node to check whether all processes are started properly. (The following figures show the processes to be started on server1 and agent1, respectively. The processes to be started on other server nodes and agent nodes are similar.)
1jps


Parent topic: Deploying Hadoop