HDFS fsck命令输出

时间:2015-12-28 16:27:07

标签: hadoop namespaces hdfs yarn fsck

我在输出中得到了这个,所以我只想知道什么是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 个答案:

答案 0 :(得分:6)

  1. BP-929597290-192.0.0.2-1439573305237

    这是Block Pool ID。块池是属于单个名称空间的一组块。为简单起见,您可以说名称节点管理的所有块都在同一个块池下。

    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
    
  6. 第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]]