系统相关
首页 > 系统相关> > linux启动hadoop集群失败,不显示datanode

linux启动hadoop集群失败,不显示datanode

作者:互联网

问题Bug:jps启动后datanode没打开原因:多次格式化HDFS,即hdfs namenode -format ,导致namenode和datanode集群不一致
解决:将data下的clusterID改成name下的clusterID(位置root家目录)
1.name节点位置和current下的version

1 [root@huli name]# pwd
2 /tmp/hadoop-hadoop/dfs/name
3 [root@huli name]# ll
4 total 4
5 drwxrwxr-x 2 hadoop hadoop 4096 Sep  8 22:45 current
2.查看clusterID
 
 1 #data
 2 [root@huli current]# cat VERSION 
 3 #Thu Sep 08 21:17:55 CST 2022
 4 storageID=DS-3c67a794-88b4-44c5-ac1d-58d5160c22e0
 5 clusterID=CID-cc244d0f-1362-4a36-9b76-77dca858117e
 6 cTime=0
 7 datanodeUuid=68d4964e-3e20-40ea-9875-120e069469d1
 8 storageType=DATA_NODE
 9 layoutVersion=-57
10 #namesecondary
11 [root@huli namesecondary]# cd current/
12 [root@huli current]# cat VERSION 
13 #Thu Sep 08 21:18:58 CST 2022
14 namespaceID=868983427
15 clusterID=CID-cc244d0f-1362-4a36-9b76-77dca858117e
16 cTime=1662643059522
17 storageType=NAME_NODE
18 blockpoolID=BP-1922997848-172.27.111.210-1662643059522
19 layoutVersion=-64
20 #name
21 [root@huli name]# cd current/
22 [root@huli current]# cat VERSION 
23 #Thu Sep 08 21:53:05 CST 2022
24 namespaceID=566624069
25 clusterID=CID-4cbd08dc-24c8-4b92-a283-bfaed0861c79
26 cTime=1662645185212
27 storageType=NAME_NODE
28 blockpoolID=BP-425923728-172.27.111.210-1662645185212
29 layoutVersion=-64
View Code 3.更改datanode里VERSION的clusterID=namenode的clusterID即可

标签:name,huli,clusterID,hadoop,current,datanode,linux,root
来源: https://www.cnblogs.com/xuehualizi/p/16671431.html