You need to do something like this:
bin/stop-all.sh
(orstop-dfs.sh
andstop-yarn.sh
in the 2.x serie)rm -Rf /app/tmp/hadoop-your-username/*
bin/hadoop namenode -format
(orhdfs
in the 2.x serie)
the solution was taken from:
http://pages.cs.brandeis.edu/~cs147a/lab/hadoop-troubleshooting/. Basically it consists in restarting from scratch, so make sure you won’t loose data by formating the hdfs.