HDFS-10941. Improve BlockManager#processMisReplicatesAsync log. Contributed by Chen Liang.
(cherry picked from commit 4484b48498
)
This commit is contained in:
parent
ae7a20f524
commit
c443ecb267
|
@ -2882,24 +2882,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