HDFS-8484. Erasure coding: Two contiguous blocks occupy IDs belong to same striped group. Contributed by Walter Su.
This commit is contained in:
parent
2470a7bf88
commit
e692c7dd92
|
@ -338,3 +338,6 @@
|
|||
|
||||
HDFS-8563. Erasure Coding: fsck handles file smaller than a full stripe.
|
||||
(Walter Su via jing9)
|
||||
|
||||
HDFS-8484. Erasure coding: Two contiguous blocks occupy IDs belong to same
|
||||
striped group. (Walter Su via jing9)
|
||||
|
|
|
@ -3690,18 +3690,20 @@ public class BlockManager {
|
|||
}
|
||||
|
||||
public BlockInfo getStoredBlock(Block block) {
|
||||
BlockInfo info = null;
|
||||
if (BlockIdManager.isStripedBlockID(block.getBlockId())) {
|
||||
info = blocksMap.getStoredBlock(
|
||||
if (!BlockIdManager.isStripedBlockID(block.getBlockId())) {
|
||||
return blocksMap.getStoredBlock(block);
|
||||
}
|
||||
if (!hasNonEcBlockUsingStripedID) {
|
||||
return blocksMap.getStoredBlock(
|
||||
new Block(BlockIdManager.convertToStripedID(block.getBlockId())));
|
||||
if ((info == null) && hasNonEcBlockUsingStripedID){
|
||||
info = blocksMap.getStoredBlock(block);
|
||||
}
|
||||
} else {
|
||||
info = blocksMap.getStoredBlock(block);
|
||||
}
|
||||
BlockInfo info = blocksMap.getStoredBlock(block);
|
||||
if (info != null) {
|
||||
return info;
|
||||
}
|
||||
return blocksMap.getStoredBlock(
|
||||
new Block(BlockIdManager.convertToStripedID(block.getBlockId())));
|
||||
}
|
||||
|
||||
/** updates a block in under replication queue */
|
||||
private void updateNeededReplications(final BlockInfo block,
|
||||
|
|
Loading…
Reference in New Issue