The way to check a HDFS directory's size?

前端 未结 10 612
轻奢々
轻奢々 2021-01-30 12:14

I know du -sh in common Linux filesystems. But how to do that with HDFS?

10条回答
  •  迷失自我
    2021-01-30 12:46

    Prior to 0.20.203, and officially deprecated in 2.6.0:

    hadoop fs -dus [directory]
    

    Since 0.20.203 (dead link) 1.0.4 and still compatible through 2.6.0:

    hdfs dfs -du [-s] [-h] URI [URI …]
    

    You can also run hadoop fs -help for more info and specifics.

提交回复
热议问题