查看表的大小通常的方法是hdfs dfs -du -h, 但统计的是子目录的大小,如:
hdfs dfs -du -h /user/hive/warehouse/tmp.db/xxx
555.7 G 1.6 T /user/hive/warehouse/tmp.db/xxx/data_date=20200610
556.2 G 1.6 T /user/hive/warehouse/tmp.db/xxxt/data_date=20200611
其实我们需要统计当前目录的大小时可加入 -s ,如:
hdfs dfs -du -s -h /user/hive/warehouse/tmp.db/xxxx/
26.9 G 80.7 G /user/hive/warehouse/tmp.db/xxxx
当我们需要看文件是否小文件过多时,查看文件个数
hdfs dfs -count -h /user/hive/warehouse/tmp.db/xxxx
3.6 K 62.9 K 353.5 G /user/hive/warehouse/tmp.db/xxxx
分别代表:3.6k文件夹, 62.9k文件 以及总大小353.5 G
645

被折叠的 条评论
为什么被折叠?



