hdfs shell API-count

清疚 2022-04-06 17:48 247阅读 0赞
  1. hadoop fs -help count
  2. -count [-q] [-h] <path> ... :
  3. Count the number of directories, files and bytes under the paths
  4. that match the specified file pattern. The output columns are:
  5. DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME or
  6. QUOTA REMAINING_QUOTA SPACE_QUOTA REMAINING_SPACE_QUOTA
  7. DIR_COUNT FILE_COUNT CONTENT_SIZE FILE_NAME
  8. The -h option shows file sizes in human readable format.

官方文档中也给出了API解释:
在这里插入图片描述
返回值中:
第一个数值 19 表示 查询目录下个数
第二个数值 24表示 文件个数
第三个数值 表示 字节数大小

发表评论

表情:
评论列表 (有 0 条评论,247人围观)

还没有评论,来说两句吧...

相关阅读

    相关 HDFSshell操作

    环境搭建请参看我前面的Hadoop集群安装博客。 -ls :查询指定路径信息 -put :从本地上传文件 -cat :查看HDFS文件内容 -