Skip to main content
kiranpune
Silver ⭐️⭐️
Jan 19, 2020 8:35 AM UTC
Solved

HDFS

I have removed files from HDFS by skipping trash but still it shows same disk useage

amk
amkAnswer
Gold ⭐️
Jan 19, 2020 4:07 PM UTC

How much data did you delete ? Did checkpoint happen after you deleted data ? Also please check if any snapshots are present ? HDFS CLI "du" output not only include normal files but also includes the files that have been deleted and exist in snapshots (which is true in terms of real resource consumption).

 

Please check the output using -x flag which excludes snapshot from calculation.

 

hdfs dfs -du -x -s -h /path

 

 

1 reply

amk
Gold ⭐️
amkAnswer
Gold ⭐️
Jan 19, 2020 4:07 PM UTC

How much data did you delete ? Did checkpoint happen after you deleted data ? Also please check if any snapshots are present ? HDFS CLI "du" output not only include normal files but also includes the files that have been deleted and exist in snapshots (which is true in terms of real resource consumption).

 

Please check the output using -x flag which excludes snapshot from calculation.

 

hdfs dfs -du -x -s -h /path

 

 

Translate