2019-03-28 08:31:49,347 WARN org.apache.hadoop.hdfs.server.common.Storage: Failed to add storage directory [DISK]file:/opt/hadoop-repo/data/ java.io.IOException: Incompatible clusterIDs in /opt/hadoop-repo/data: namenode clusterID = CID-50b8afea-9e44-4363-970d-4a40917d968a; datanode clusterID = CID-865e7596-297e-4d6a-a997-afec3be712e9 at org.apache.hadoop.hdfs.server.datanode.DataStorage.doTransition(DataStorage.java:777) at org.apache.hadoop.hdfs.server.datanode.DataStorage.loadStorageDirectory(DataStorage.java:300) at org.apache.hadoop.hdfs.server.datanode.DataStorage.loadDataStorage(DataStorage.java:416) at org.apache.hadoop.hdfs.server.datanode.DataStorage.addStorageLocations(DataStorage.java:395) at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:573) at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:1393) at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:1358) at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:313) at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:216) at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:637) at java.lang.Thread.run(Thread.java:748)
直接删除数据节点DataNode的current文件夹,即可启动