Viewing the number of blocks for a file in hadoop

前端 未结 4 763
暖寄归人
暖寄归人 2020-12-15 05:53

How can I view how many blocks has a file been broken into, in a Hadoop file system?

4条回答
  •  眼角桃花
    2020-12-15 06:30

    We can use hadoop file system check command to know the blocks for the specific file.

    Below is the command:

    hadoop fsck [path] [options]
    

    To view the blocks for the specific file :

    hadoop fsck /path/to/file -files -blocks
    

提交回复
热议问题