hadoop – Incompatible namespaceIDs in hadoop/dfs/data
Are you seeing this ?
org.apache.hadoop.hdfs.server.datanode.DataNode: java.io.IOException: Incompatible namespaceIDs in hadoop/dfs/data: namenode namespaceID = X; datanode namespaceID = Y
The fix (in the order)
- Delete VERSION files in the dfs directory
$ find /hadoop/dfs -name VERSION -exec rm -rf "{}" \;)
- Format the namenode (#hadoop namenode -format)
Cause
A new namespaceIDs (present in VERSION file) is generated each time the HDFS is formatted. It should be same for both VERSION files of data and name node.
Caution
Backup all your data. I am not responsible for your loss of data.