可用
hdfs dfs -help du
-du [-s] [-h] <path> ...: Show the amount of space, in bytes, used by the files that
match the specified file pattern. The following flags are optional:
-s Rather than showing the size of each individual file that
matches the pattern, shows the total (summary) size.
-h Formats the sizes of files in a human-readable fashion
rather than a number of bytes.
Note that, even without the -s option, this only shows size summaries
one level deep into a directory.
The output is in the form
size name(full path)
另 一般 hive 计算完毕,日志会显示
stats: [numFiles=1, numRows=62xx9xx, totalSize=83xx236xx, rawDataSize=81x49xxx]
且有如下语法,对部分计算过产生的分区,可以统计大小
ANALYZE TABLE tablename [PARTITION(partcol1[=val1], partcol2[=val2], ...)] COMPUTE STATISTICS [noscan];
参考 :
https://cwiki.apache.org/confluence/display/Hive/StatsDev