HDFS-12932. Fix confusing LOG message for block replication. Contributed by Chao Sun.

This commit is contained in:
Wei Yan 2017-12-20 08:55:46 -08:00
parent d62932c3b2
commit a78db99190
1 changed files with 4 additions and 1 deletions

View File

@ -414,9 +414,12 @@ public class FSDirAttrOp {
if (oldBR > targetReplication) { if (oldBR > targetReplication) {
FSDirectory.LOG.info("Decreasing replication from {} to {} for {}", FSDirectory.LOG.info("Decreasing replication from {} to {} for {}",
oldBR, targetReplication, iip.getPath()); oldBR, targetReplication, iip.getPath());
} else { } else if (oldBR < targetReplication) {
FSDirectory.LOG.info("Increasing replication from {} to {} for {}", FSDirectory.LOG.info("Increasing replication from {} to {} for {}",
oldBR, targetReplication, iip.getPath()); oldBR, targetReplication, iip.getPath());
} else {
FSDirectory.LOG.info("Replication remains unchanged at {} for {}",
oldBR, iip.getPath());
} }
} }
return file.getBlocks(); return file.getBlocks();