Wednesday, September 19, 2012

hadoop - Incompatible namespaceIDs in hadoop/dfs/data


Are you seeing - 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)

  1. Delete VERSION files in the dfs directory (#find /hadoop/dfs -name VERSION -exec rm -rf "{}" \;)
  2. 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.



1 comment:

I would be glad to know if this post helped you.