How to check total files size in hdfs directory How to check total files size in hdfs directory hadoop hadoop

How to check total files size in hdfs directory


you can use df or report'hadoop fs -count -q -h it will show the total size

[root@hadoop0 ~]# hadoop fs -df -h /Filesystem              Size    Used  Available  Use%hdfs://hadoop0:8020  119.9 G  27.8 G     62.3 G   23%[root@hadoop0 ~]# hadoop dfsadmin -report DEPRECATED: Use of this script to execute hdfs command is deprecated.Instead use the hdfs command for it.Configured Capacity: 128770375680 (119.93 GB)Present Capacity: 96752292952 (90.11 GB)DFS Remaining: 66886767274 (62.29 GB)DFS Used: 29865525678 (27.81 GB)DFS Used%: 30.87%Under replicated blocks: 0Blocks with corrupt replicas: 0Missing blocks: 0Missing blocks (with replication factor 1): 0