After shutting down the cluster ./stop-all.sh
, and then invoking a hadoop namenode -format
, I see that the datanodes have the same disk space i.e. the space has not been freed up.
Why is that?
You can delete manually data on DataNode before formatting NameNode
rmr
Usage: hadoop fs -rmr URI [URI …]
Recursive version of delete. Example:
hadoop fs -rmr /user/hadoop/dir
hadoop fs -rmr hdfs://nn.example.com/user/hadoop/dir
Exit Code:
Returns 0 on success and -1 on error.
Alternatively
Data-nodes should be reformatted whenever the name-node is. I see 2 approaches here:
https://issues.apache.org/jira/browse/HDFS-107
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With