Repository: hadoop Updated Branches: refs/heads/trunk d62932c3b -> a78db9919
HDFS-12932. Fix confusing LOG message for block replication. Contributed by Chao Sun. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a78db991 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a78db991 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a78db991 Branch: refs/heads/trunk Commit: a78db9919065d06ced8122229530f44cc7369857 Parents: d62932c Author: Wei Yan <w...@apache.org> Authored: Wed Dec 20 08:55:46 2017 -0800 Committer: Wei Yan <w...@apache.org> Committed: Wed Dec 20 08:55:46 2017 -0800 ---------------------------------------------------------------------- .../org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/a78db991/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java index 0dfaa8e..201605f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java @@ -414,9 +414,12 @@ public class FSDirAttrOp { if (oldBR > targetReplication) { FSDirectory.LOG.info("Decreasing replication from {} to {} for {}", oldBR, targetReplication, iip.getPath()); - } else { + } else if (oldBR < targetReplication) { FSDirectory.LOG.info("Increasing replication from {} to {} for {}", oldBR, targetReplication, iip.getPath()); + } else { + FSDirectory.LOG.info("Replication remains unchanged at {} for {}", + oldBR, iip.getPath()); } } return file.getBlocks(); --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org