2017-07-17 43 views
0

當我啓動Hadoop羣集時,引發以下異常。我沒有想法解決它。任何人都幫助我。謝謝Hadoop異常:所有指定的目錄加載失敗

2017-07-10 09:40:58,960 WARN org.apache.hadoop.hdfs.server.common.Storage: java.io.IOException: Incompatible clusterIDs in /tools/hadoop/hadoop_storage/hdfs/datanode: namenode clusterID = CID-47191263-b5b7-4a4d-b8b5-a78b782e66bb; datanode clusterID = CID-79a53373-9652-4c08-9735-b5972e0450ca 
2017-07-10 09:40:58,960 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for Block pool <registering> (Datanode Uuid unassigned) service to localhost/127.0.0.1:54310. Exiting. 
java.io.IOException: All specified directories are failed to load. 
    at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:478) 
    at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:1358) 
    at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:1323) 
    at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:317) 
    at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:223) 
    at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:802) 
    at java.lang.Thread.run(Thread.java:745) 
2017-07-10 09:40:58,961 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Ending block pool service for: Block pool <registering> (Datanode Uuid unassigned) service to localhost/127.0.0.1:54310 
2017-07-10 09:40:58,962 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Removed Block pool <registering> (Datanode Uuid unassigned) 
2017-07-10 09:41:00,962 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Exiting Datanode 
2017-07-10 09:41:00,964 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 0 
2017-07-10 09:41:00,966 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG: 

回答

1

它可能會再次格式化您的羣集,因此它會在主節點和數據節點中生成不同的ID羣集。 您的namenode和datanode羣集ID不匹配,您確保使它們相同。 在名稱節點,更改文件中的集羣ID位於:

$ nano HADOOP_FILE_SYSTEM/namenode/current/VERSION 

在數據節點您集羣ID存儲在文件中:

$ nano HADOOP_FILE_SYSTEM/datanode/current/VERSION 

無論您更改ID,但保證的方式集羣節點中的ID是相同的。

相關問題