Viewing the number of blocks for a file in hadoop

前端 未结 4 759
暖寄归人
暖寄归人 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:34

    It is always a good idea to use hdfs instead of hadoop as 'hadoop' version is deprecated.

    Here is the command with hdfs and to find the details on a file named 'test.txt' in the root, you would write

    hdfs fsck /test.txt -files -blocks -locations

提交回复
热议问题