[ https://issues.apache.org/jira/browse/HDFS-8248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14524169#comment-14524169 ]
Jing Zhao commented on HDFS-8248: --------------------------------- # Please add javadoc for {{BlockInfoContiguous#bcId}} # Currently we only record repliation factor in INodeFile. For a file in snapshots, its block replication factor is actually the largest replication factor in (current state + snaphsots). The replication factor recorded in BlockInfo also needs to follow this logic. Also note that the BlockInfo's replication factor may need to be updated when a snapshot is deleted. # We can wrap the following two lines into a single function inside of BlockManager. {code} long bcId = getBlockCollectionId(block); bc = namesystem.getBlockCollection(bcId); {code} # Also need to fix the format in a couple of places in BlockManager. > Store INodeId instead of the INodeFile object in BlockInfoContiguous > -------------------------------------------------------------------- > > Key: HDFS-8248 > URL: https://issues.apache.org/jira/browse/HDFS-8248 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Haohui Mai > Assignee: Haohui Mai > Attachments: HDFS-8248.000.patch, HDFS-8248.001.patch, > HDFS-8248.002.patch, HDFS-8248.003.patch > > > Currently the namespace and the block manager are tightly coupled together. > There are two couplings in terms of implementation: > 1. The {{BlockInfoContiguous}} stores a reference of the {{INodeFile}} that > owns the block, so that the block manager can look up the corresponding file > when replicating blocks, recovering from pipeline failures, etc. > 1. The {{INodeFile}} stores {{BlockInfoContiguous}} objects that the file > owns. > Decoupling the namespace and the block manager allows the BM to be separated > out from the Java heap or even as a standalone process. This jira proposes to > remove the first coupling by storing the id of the inode instead of the > object reference of {{INodeFile}} in the {{BlockInfoContiguous}} class. -- This message was sent by Atlassian JIRA (v6.3.4#6332)