Support Questions

Find answers, ask questions, and share your expertise

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

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 ?


@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.

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: