HDFS-9618. Fix mismatch between log level and guard in BlockManager#computeRecoveryWorkForBlocks (iwasakims)

This commit is contained in:
Masatake Iwasaki 2016-01-22 14:11:48 +09:00
parent e30668106d
commit ae9c61ff0a
2 changed files with 5 additions and 3 deletions

View File

@ -951,6 +951,9 @@ Release 2.9.0 - UNRELEASED
HDFS-9601. NNThroughputBenchmark.BlockReportStats should handle HDFS-9601. NNThroughputBenchmark.BlockReportStats should handle
NotReplicatedYetException on adding block (iwasakims) NotReplicatedYetException on adding block (iwasakims)
HDFS-9618. Fix mismatch between log level and guard in
BlockManager#computeRecoveryWorkForBlocks (iwasakims)
HDFS-9621. getListing wrongly associates Erasure Coding policy to pre-existing HDFS-9621. getListing wrongly associates Erasure Coding policy to pre-existing
replicated files under an EC directory. (jing9) replicated files under an EC directory. (jing9)

View File

@ -1488,7 +1488,7 @@ public class BlockManager implements BlockStatsMXBean {
namesystem.writeUnlock(); namesystem.writeUnlock();
} }
if (blockLog.isInfoEnabled()) { if (blockLog.isDebugEnabled()) {
// log which blocks have been scheduled for replication // log which blocks have been scheduled for replication
for(BlockRecoveryWork rw : recovWork){ for(BlockRecoveryWork rw : recovWork){
DatanodeStorageInfo[] targets = rw.getTargets(); DatanodeStorageInfo[] targets = rw.getTargets();
@ -1502,8 +1502,7 @@ public class BlockManager implements BlockStatsMXBean {
rw.getBlock(), targetList); rw.getBlock(), targetList);
} }
} }
}
if (blockLog.isDebugEnabled()) {
blockLog.debug("BLOCK* neededReplications = {} pendingReplications = {}", blockLog.debug("BLOCK* neededReplications = {} pendingReplications = {}",
neededReplications.size(), pendingReplications.size()); neededReplications.size(), pendingReplications.size());
} }