14
So this is what I have had to do in the past.
1. Navigate to your hadoop directory on your NameNode, then stop all the hadoop processes. By running the default stop-all script. This will also stop DFS. e.g.
cd myhadoopdirectory
bin/stop-all.sh
2. Now On every machine in your cluster (Namenodes, JobTrackers, datanodes etc.) delete all files in your main hadoop storage mine is set to the temp folder in the root folder. Yours can be found in the conf hdfs-site.xml file under hadoop.tmp.dir property e.g.
cd /temp/
rm -r *
3. Finally go back to your name node, and format it by going to your hadoop directory and running 'bin/hadoop namenode -format' e.g.
cd myhadoopdirectory
bin/hadoop namenode -format
4. Start up your cluster again by running the following command. It will also startup DFS again.
bin/start-all.sh
5. And it should work.