how to find file from blockName in HDFS hadoop

前端 未结 2 1971
终归单人心
终归单人心 2021-02-02 02:27

What\'s the easiest way to find file associated with a block in HDFS given a block Name/ID

2条回答
  •  情书的邮戳
    2021-02-02 02:50

    Not sure when this was introduced but you can do this

    hdfs fsck -blockId 
    
    hdfs fsck -blockId blk_1100790203
    Connecting to namenode 
    FSCK started by hdfs 
    
    Block Id: blk_1100790203
    Block belongs to: /common/FFL1447685899336.txt
    

提交回复
热议问题