HDFS-10941. Improve BlockManager#processMisReplicatesAsync log. Contributed by Chen Liang.

This commit is contained in:
Xiaoyu Yao 2016-11-11 14:30:53 -08:00
parent ede1a473f5
commit 4484b48498
1 changed files with 5 additions and 3 deletions

View File

@ -3232,24 +3232,26 @@ public class BlockManager implements BlockStatsMXBean {
while (processed < numBlocksPerIteration && blocksItr.hasNext()) {
BlockInfo block = blocksItr.next();
MisReplicationResult res = processMisReplicatedBlock(block);
if (LOG.isTraceEnabled()) {
LOG.trace("block " + block + ": " + res);
}
switch (res) {
case UNDER_REPLICATED:
LOG.trace("under replicated block {}: {}", block, res);
nrUnderReplicated++;
break;
case OVER_REPLICATED:
LOG.trace("over replicated block {}: {}", block, res);
nrOverReplicated++;
break;
case INVALID:
LOG.trace("invalid block {}: {}", block, res);
nrInvalid++;
break;
case POSTPONE:
LOG.trace("postpone block {}: {}", block, res);
nrPostponed++;
postponeBlock(block);
break;
case UNDER_CONSTRUCTION:
LOG.trace("under construction block {}: {}", block, res);
nrUnderConstruction++;
break;
case OK: