[ https://issues.apache.org/jira/browse/HDFS-10096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vinayakumar B deleted HDFS-10096: --------------------------------- > CLONE - Fix the isNeededReplication calculation for Striped block in NN > ----------------------------------------------------------------------- > > Key: HDFS-10096 > URL: https://issues.apache.org/jira/browse/HDFS-10096 > Project: Hadoop HDFS > Issue Type: Sub-task > Reporter: dragon > Assignee: Yi Liu > Priority: Critical > Fix For: HDFS-7285 > > > Currently when calculating {{isNeededReplication}} for striped block, we use > BlockCollection#getPreferredBlockReplication to get expected replica number > for striped block. See an example: > {code} > public void checkReplication(BlockCollection bc) { > final short expected = bc.getPreferredBlockReplication(); > for (BlockInfo block : bc.getBlocks()) { > final NumberReplicas n = countNodes(block); > if (isNeededReplication(block, expected, n.liveReplicas())) { > neededReplications.add(block, n.liveReplicas(), > n.decommissionedAndDecommissioning(), expected); > } else if (n.liveReplicas() > expected) { > processOverReplicatedBlock(block, expected, null, null); > } > } > } > {code} > But actually it's not correct, for example, if the length of striped file is > less than a cell, then the expected replica of the block should be {{1 + > parityBlkNum}} instead of {{dataBlkNum + parityBlkNum}}. -- This message was sent by Atlassian JIRA (v6.3.4#6332)