From d15e60777bd0924ff8b3b3adaf96c0b65ef8a273 Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Thu, 13 Oct 2011 03:38:58 +0000 Subject: [PATCH] HADOOP-7664. Remove warmings when overriding final parameter configuration if the override value is same as the final parameter value. Contributed by Ravi Prakash. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1182645 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 4 ++++ .../src/main/java/org/apache/hadoop/conf/Configuration.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 71ffb322f9e..b586c0b7d66 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -38,6 +38,10 @@ Trunk (unreleased changes) HADOOP-7509. Improve exception message thrown when Authentication is required. (Ravi Prakash via suresh) + HADOOP-7664. Remove warmings when overriding final parameter configuration + if the override value is same as the final parameter value. + (Ravi Prakash via suresh) + BUGS HADOOP-7606. Upgrade Jackson to version 1.7.1 to match the version required diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java index 4fb1d190663..a3d4de0cb37 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java @@ -1580,7 +1580,7 @@ public class Configuration implements Iterable>, if (!finalParameters.contains(attr)) { properties.setProperty(attr, value); updatingResource.put(attr, name.toString()); - } else { + } else if (!value.equals(properties.getProperty(attr))) { LOG.warn(name+":an attempt to override final parameter: "+attr +"; Ignoring."); }