When formatting a namenode, the space is not cleared. This must be done manually.
To do this,
First stop the cluster by calling ./stop-all.sh or ./stop-mapred.sh and ./stop-dfs.sh in the correct order.
Then delete the data directory for datanode, i.e. the directory specified by dfs.data.dir in hdfs-site.xml or hadoop.tmp.dir / dfs / data p>
Being able to do -rmr (mentioned in one of the other answers to this question) before doing the format is actually the best way if you are not like me, who unknowingly formatted the namenode, and THEN realized that the datanode space is not cleared; )
Nerrve
source share