Block类图描述

前面2个描述了datanode以及INodeFile,还缺个Block的描述,这里补上,针对block的结构还有些不是特别明确,这个需要举例子才好说明,先把大体的类图结构描述下

 


    Block

 

Java代码     收藏代码
  1. /**************************************************  
  2.  * A Block is a Hadoop FS primitive, identified by a   
  3.  * long.  
  4.  *  
  5.  **************************************************/   

 

     BlocksMap

 

 

Java代码     收藏代码
  1. /**  
  2.  * This class maintains the map from a block to its metadata.  
  3.  * block's metadata currently includes INode it belongs to and  
  4.  * the datanodes that store the block.  
  5.  */   

 

      BlockInfo

 

 

Java代码     收藏代码
  1. /**  
  2.    * Internal class for block metadata.  
  3.    */   

 

     Object[] triplets

 

 

Java代码     收藏代码
  1. /**  
  2.  * This array contains triplets of references.  
  3.  * For each i-th data-node the block belongs to  
  4.  * triplets[3*i] is the reference to the DatanodeDescriptor  
  5.  * and triplets[3*i+1] and triplets[3*i+2] are references   
  6.  * to the previous and the next blocks, respectively, in the   
  7.  * list of blocks belonging to this data-node.  
  8.  */   

 更多信息请查看 java进阶网 http://www.javady.com

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值