【HDFS】NN处理全量块汇报时reportDiff的一些细节

  • NN处理全量块汇报(FBR)时的一些细节
  • 怎么生成的toRemove
  • 怎么check 汇报上来的块是不是corrupt的?
  • reportDiff方法里巧妙地引入delimiterBlock这个block的作用

前置知识:【HDFS】Block、BlockInfo、BlockInfoContiguous、BlockInfoStriped的分析记录

上面的文章中介绍了关于BlockInfo类里move当前块到storage存储列表的头的方法。在本文要描述的reportDiff方法里会用到。

首先声明reportDiff方法的调用上下文:

datanode侧进行全量块汇报 -> NameNodeRpcServer#blockReport方法 -> BlockManager#processReport方法及重载 -> reportDiff方法 -> processReportedBlock方法

reportDiff详细分析:

  private void reportDiff(DatanodeStorageInfo storageInfo,
      BlockListAsLongs

你可能感兴趣的:(HDFS全方位实战,hdfs,hadoop,大数据,java)