`

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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics