hdfs shell API-count
hadoop fs -help count
-count [-q] [-h] <path> ... :
Count the number of directories, files and bytes under the paths
that match the specified file pattern. The output columns are:
DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME or
QUOTA REMAINING_QUOTA SPACE_QUOTA REMAINING_SPACE_QUOTA
DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME
The -h option shows file sizes in human readable format.
官方文档中也给出了API解释:
返回值中:
第一个数值 19 表示 查询目录下个数
第二个数值 24表示 文件个数
第三个数值 表示 字节数大小
还没有评论,来说两句吧...