Support Questions

Find answers, ask questions, and share your expertise

After removed files in HDFS still it shows same disk useage ?

avatar
Contributor

After performed the Terasort benchmark. I cleared the input and output directory. But still i can see the HDFS (Disk) usage same . No difference. Does it the files are still in HDFS ?

2 REPLIES 2

avatar
Super Guru

@Ganesan Vetri

Did you use the --skipTrash option when you deleted the files? If you don't specify that option, things get moved into a trash can so the space is not immediately freed.

avatar
Super Guru

@Ganesan Vetri

Like Michael mentions, files are not deleted immediately and rather moved to trash folder if you did not use "-skiptrash" option when deleting the folder. You can call the "hadoop fs -expunge" explicitly to empty trash. Even better, the folder you are trying to delete from has a subfolder called ".Trash". Just clear that up using "rm" command you'll reclaim the space.

hdfs dfs -rm /path/to/trash/folder ///just like any other path.

See how Trash works for better understanding:

http://hadoop.apache.org/docs/r2.7.2/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html#Space_Reclamati...