HDFS-14642. processMisReplicatedBlocks does not return correct processed count. Contributed by Stephen O'Donnell.
This commit is contained in:
parent
ef66e4999f
commit
f77d54c243
@ -3642,6 +3642,7 @@ public class BlockManager implements BlockStatsMXBean {
|
|||||||
while (iter.hasNext() && processed < limit) {
|
while (iter.hasNext() && processed < limit) {
|
||||||
BlockInfo blk = iter.next();
|
BlockInfo blk = iter.next();
|
||||||
MisReplicationResult r = processMisReplicatedBlock(blk);
|
MisReplicationResult r = processMisReplicatedBlock(blk);
|
||||||
|
processed++;
|
||||||
LOG.debug("BLOCK* processMisReplicatedBlocks: " +
|
LOG.debug("BLOCK* processMisReplicatedBlocks: " +
|
||||||
"Re-scanned block {}, result is {}", blk, r);
|
"Re-scanned block {}, result is {}", blk, r);
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ public class TestBlocksWithNotEnoughRacks {
|
|||||||
"/testFile: Replica placement policy is violated"));
|
"/testFile: Replica placement policy is violated"));
|
||||||
assertTrue(fsckOp.contains(" Block should be additionally replicated" +
|
assertTrue(fsckOp.contains(" Block should be additionally replicated" +
|
||||||
" on 1 more rack(s). Total number of racks in the cluster: 2"));
|
" on 1 more rack(s). Total number of racks in the cluster: 2"));
|
||||||
|
assertTrue(fsckOp.contains(" Blocks queued for replication:\t1"));
|
||||||
try {
|
try {
|
||||||
DFSTestUtil.waitForReplication(cluster, b, 2, replicationFactor, 0);
|
DFSTestUtil.waitForReplication(cluster, b, 2, replicationFactor, 0);
|
||||||
} catch (TimeoutException e) {
|
} catch (TimeoutException e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user