HDFS-10941. Improve BlockManager#processMisReplicatesAsync log. Contributed by Chen Liang.
This commit is contained in:
parent
ede1a473f5
commit
4484b48498
|
@ -3232,24 +3232,26 @@ public class BlockManager implements BlockStatsMXBean {
|
||||||
while (processed < numBlocksPerIteration && blocksItr.hasNext()) {
|
while (processed < numBlocksPerIteration && blocksItr.hasNext()) {
|
||||||
BlockInfo block = blocksItr.next();
|
BlockInfo block = blocksItr.next();
|
||||||
MisReplicationResult res = processMisReplicatedBlock(block);
|
MisReplicationResult res = processMisReplicatedBlock(block);
|
||||||
if (LOG.isTraceEnabled()) {
|
|
||||||
LOG.trace("block " + block + ": " + res);
|
|
||||||
}
|
|
||||||
switch (res) {
|
switch (res) {
|
||||||
case UNDER_REPLICATED:
|
case UNDER_REPLICATED:
|
||||||
|
LOG.trace("under replicated block {}: {}", block, res);
|
||||||
nrUnderReplicated++;
|
nrUnderReplicated++;
|
||||||
break;
|
break;
|
||||||
case OVER_REPLICATED:
|
case OVER_REPLICATED:
|
||||||
|
LOG.trace("over replicated block {}: {}", block, res);
|
||||||
nrOverReplicated++;
|
nrOverReplicated++;
|
||||||
break;
|
break;
|
||||||
case INVALID:
|
case INVALID:
|
||||||
|
LOG.trace("invalid block {}: {}", block, res);
|
||||||
nrInvalid++;
|
nrInvalid++;
|
||||||
break;
|
break;
|
||||||
case POSTPONE:
|
case POSTPONE:
|
||||||
|
LOG.trace("postpone block {}: {}", block, res);
|
||||||
nrPostponed++;
|
nrPostponed++;
|
||||||
postponeBlock(block);
|
postponeBlock(block);
|
||||||
break;
|
break;
|
||||||
case UNDER_CONSTRUCTION:
|
case UNDER_CONSTRUCTION:
|
||||||
|
LOG.trace("under construction block {}: {}", block, res);
|
||||||
nrUnderConstruction++;
|
nrUnderConstruction++;
|
||||||
break;
|
break;
|
||||||
case OK:
|
case OK:
|
||||||
|
|
Loading…
Reference in New Issue