HDFS fsck 命令输出

HDFS fsck command output

我在输出中得到了这个,所以我只想知道什么是 BP,Blk?你能解释一下这个输出中每件事的含义吗?我知道

 BP-929597290-192.0.0.2-1439573305237:blk_1074084574_344316 len=2 repl=3 [DatanodeInfoWithStorage[192.0.0.9:1000,DS-730a75d3-046c-4254-990a-4eee9520424f,DISK], DatanodeInfoWithStorage[192.0.0.1:1000,DS-fc6ee5c7-e76b-4faa-b663-58a60240de4c,DISK], DatanodeInfoWithStorage[192.0.0.3:1000,DS-8ab81b26-309e-42d6-ae14-26eb88387cad,DISK]]

我猜192.0.0.9:1000这是第一次复制数据的Ip

  1. BP-929597290-192.0.0.2-1439573305237

    这是块池 ID。块池是属于单个名称 space 的一组块。为了简单起见,你可以说一个Name Node管理的所有block都在同一个Block Pool下。

    区块池的构成如下:

    String bpid = "BP-" + rand + "-"+ ip + "-" + Time.now();        
    
    Where: 
    rand = Some random number
    ip = IP address of the Name Node
    Time.now() - Current system time
    

    在此处了解块池:https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/Federation.html

  2. blk_1074084574_344316:

    区块的区块编号。 HDFS 中的每个块都有一个唯一的标识符。

    区块ID的构成为:

    blk_<blockid>_<genstamp> 
    
    Where: 
    blockid = ID of the block
    genstamp = an incrementing integer that records the version of a particular block
    

    在此处阅读有关代戳的信息:http://blog.cloudera.com/blog/2009/07/file-appends-in-hdfs/

  3. len=2

    块的长度:块中的字节数

  4. repl=3

    这个区块有3个副本

  5. DatanodeInfoWithStorage[192.0.0.9:1000,DS-730a75d3-046c-4254-990a-4eee9520424f,DISK

    其中:

    192.0.0.9 => IP address of the Data Node holding this block
    1000 => Data streaming port
    DS-730a75d3-046c-4254-990a-4eee9520424f => Storage ID. It is an internal ID of the Data Node. It is assigned, when the Data Node registers with Name Node
    DISK => storageType. It is DISK here. Storage type can be: RAM_DISK, SSD, DISK and ARCHIVE
    

第 5 点的描述适用于剩余的 2 个块:

DatanodeInfoWithStorage[192.0.0.1:1000,DS-fc6ee5c7-e76b-4faa-b663-58a60240de4c,DISK], 
DatanodeInfoWithStorage[192.0.0.3:1000,DS-8ab81b26-309e-42d6-ae14-26eb88387cad,DISK]]