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 int processMisReplicatedBlocks(List<BlockInfo> blocks) {
while (iter.hasNext() && processed < limit) {
BlockInfo blk = iter.next();
MisReplicationResult r = processMisReplicatedBlock(blk);
processed++;
LOG.debug("BLOCK* processMisReplicatedBlocks: " +
"Re-scanned block {}, result is {}", blk, r);
}

View File

@ -205,7 +205,7 @@ public void testMisReplicatedBlockUsesNewRack() throws Exception {
"/testFile: Replica placement policy is violated"));
assertTrue(fsckOp.contains(" Block should be additionally replicated" +
" on 1 more rack(s). Total number of racks in the cluster: 2"));
assertTrue(fsckOp.contains(" Blocks queued for replication:\t1"));
try {
DFSTestUtil.waitForReplication(cluster, b, 2, replicationFactor, 0);
} catch (TimeoutException e) {