Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Highlighted

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

New 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

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

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

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

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

Don't have an account?
Coming from Hortonworks? Activate your account here