Aliaxander
Aliaxander

Reputation: 2617

Find out directory size considering replication in HDFS

Is there any way to find out raw HDFS space consumption by a directory. As far as I know

hdfs dfs -du -s /dir

shows /dir size not considering replication of inner files.

Upvotes: 2

Views: 1606

Answers (1)

mattinbits
mattinbits

Reputation: 10428

Run the command hadoop fsck /dir and look for the parameter Average block replication. Multiple this number by the result you have from hdfs dfs -du -s /dir.

Upvotes: 2

Related Questions