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,17 +3690,19 @@ public void removeBlock(BlockInfo block) {
|
||||
}
|
||||
|
||||
public BlockInfo getStoredBlock(Block block) {
|
||||
BlockInfo info = null;
|
||||
if (BlockIdManager.isStripedBlockID(block.getBlockId())) {
|
||||
info = blocksMap.getStoredBlock(
|
||||
new Block(BlockIdManager.convertToStripedID(block.getBlockId())));
|
||||
if ((info == null) && hasNonEcBlockUsingStripedID){
|
||||
info = blocksMap.getStoredBlock(block);
|
||||
}
|
||||
} else {
|
||||
info = blocksMap.getStoredBlock(block);
|
||||
if (!BlockIdManager.isStripedBlockID(block.getBlockId())) {
|
||||
return blocksMap.getStoredBlock(block);
|
||||
}
|
||||
return info;
|
||||
if (!hasNonEcBlockUsingStripedID) {
|
||||
return blocksMap.getStoredBlock(
|
||||
new Block(BlockIdManager.convertToStripedID(block.getBlockId())));
|
||||
}
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user