Problem Description:
In the experiment, you need to add a datanode to the previous cluster, and before adding it, because the DFS was formatted in the mode Namenode, This leads to Namespaceid on the Namenode and Datanode on the previous cluster Namespaceid inconsistent, resulting in the start of the Hadoop cluster, the old Datanode there is no way to start the HDFs service, But the old Dadanode can start Tasktracker.
2015-01-28 11:01:27,561 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode:java.io.IOException: Incompatible Namespaceids In/home/hadoop/hadoop_tmp/hadoop-hadoop/dfs/data:namenode NamespaceID = 1437576128; Datanode Namespaceid = 109908095 at Org.apache.hadoop.hdfs.server.datanode.DataStorage.doTransition (datastorage.jav a:232) at Org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead (datastorage.java:147) at Org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode (datanode.java:385) at Org.apache.hadoop.hdfs.server.datanode.DataNode.<Init>(datanode.java:299) at Org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance (datanode.java:1582) At Org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode (datanode.java:1521) at Org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode (datanode.java:1539) at Org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain (datanode.java:1665) at Org.apache.hadoop.hdfs.server.datanode.DataNode.main (datanode.java:1682)
Workaround:
Modify the Namespaceid on the old Datanode to be the same as Namespaceid on the Namenode, where Datanode is stored namespaceid: ~/hadoop_tmp/hadoop-hadoop/dfs/ Data/current/version, the Namespaceid is modified to Namenode on the Namespaceid, restart the cluster can see the new node successfully joined the cluster.
Java.io.IOException:Incompatible Namespaceids