The solution to start Hadoop without dataNode process

1. Problem phenomenon:

When starting Hadoop, it was found that there was no datanode process through the jps directory.

[root@hadoop ~]# jps
1792 SecondaryNameNode
1937 Jps
1650 DataNode

2 Solution: problems caused by clusterID mismatch

I searched on the Internet, and the online statement is that all processes were not terminated beforehand when Hadoop formatting, or the clusterID of the datanode and the clusterID of the namenode did not match due to repeated formatting, so there was no datanode process after startup.

There are two
solutions : Solution 1 : Keep the existing data
Replace the clusterID in the ~/dfs/data/current/VERSION of all datanode nodes with the clusterID of the namenode in the ~/dfs/name/current/VERSION of the NameNode node.
Restarting hadoop:start-all.sh
does not affect the existing data and avoids reformatting.

Solution 2 : Reformatting.
Execute ./stop-all.sh to shut down the cluster.
Delete the folder (hadoop/tmp/) storing hdfs data blocks, and then rebuild the folder.
Delete the log file logs under hadoop and
execute hadoop namenode -format format hadoop
restart hadoop cluster

Guess you like

Origin blog.csdn.net/qq_44962429/article/details/105119701