HDFS-14642. processMisReplicatedBlocks does not return correct processed count. Contributed by Stephen O'Donnell.

This commit is contained in:
Ayush Saxena 2019-07-16 08:14:27 +05:30
parent ef66e4999f
commit f77d54c243
2 changed files with 2 additions and 1 deletions

View File

@ -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);
} }

View File

@ -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) {