Search code examples
hadoophdfsbigdatadiskspace

Find out actual disk usage in HDFS


Is there a way to find out how much space is consumed in HDFS? I used

hdfs dfs -df

but it seems to be not relevant cause after deleting huge amount of data with

hdfs dfs -rm -r -skipTrash

the previous comand displays changes not at once but after several minutes (I need up-to-date disk usage info).


Solution

  • hadoop cli is deprecated. Use hdfs instead.

    Folder wise :

    sudo -u hdfs hdfs dfs -du -h /
    

    Cluster wise :

    sudo -u hdfs hdfs dfsadmin -report