[ https://issues.apache.org/jira/browse/HDFS-7994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14498894#comment-14498894 ]
Zhe Zhang commented on HDFS-7994: --------------------------------- Sorry clicked Add by mistake. Continuing the comments: # Seems to be a little weird to have a setter and a getter with the same name. Since the setter is only called with true, maybe {{foundXxx}} instead of {{hasXxx}}? # Since we plan to support EC with non-striping layout in phase II, non-EC blocks should be "contiguous blocks". We can use an abbreviation of contiguous in naming # The following can be a single if with _and_? {code} if (!hasNonEcBlockUsingStripedID()){ if (BlockIdManager.isStripedBlockID(block.getBlockId())) { hasNonEcBlockUsingStripedID(true); } } {code} # Maybe I'm missing something. But what if the block passed to {{addBlockCollectionWithCheck}} is a striped block in the fsimage? > Detect if resevered EC Block ID is already used > ----------------------------------------------- > > Key: HDFS-7994 > URL: https://issues.apache.org/jira/browse/HDFS-7994 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: namenode > Reporter: Tsz Wo Nicholas Sze > Assignee: Hui Zheng > Fix For: HDFS-7285 > > Attachments: HDFS-7994_001.patch, HDFS-7994_002.patch > > > Since random block IDs were supported by some early version of HDFS, the > block ID reserved for EC blocks could be already used by some existing blocks > in a cluster. During NameNode startup, it detects if there are reserved EC > block IDs used by non-EC blocks. If it is the case, NameNode will do an > additional blocksMap lookup when there is a miss in a blockGroupsMap lookup. -- This message was sent by Atlassian JIRA (v6.3.4#6332)