ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject [1/3] ambari git commit: AMBARI-13152. [Upgrade] Check CONFIG_MERGE failed error message is consistently reported in ambari-server log (dlysnichenko)
Date Mon, 21 Sep 2015 17:57:35 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 c933395f9 -> 6a17c3362
  refs/heads/branch-2.1.2 e3b12d239 -> a0ea1000d
  refs/heads/trunk 4e3921213 -> d278ed1a2


AMBARI-13152. [Upgrade] Check CONFIG_MERGE failed error message is consistently reported in
ambari-server log (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a0ea1000
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a0ea1000
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a0ea1000

Branch: refs/heads/branch-2.1.2
Commit: a0ea1000d4868493fc53ff5a14c54ab412c39b4f
Parents: e3b12d2
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Mon Sep 21 20:56:04 2015 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Mon Sep 21 20:56:04 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ambari/server/state/ConfigMergeHelper.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a0ea1000/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigMergeHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigMergeHelper.java
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigMergeHelper.java
index 9a2c604..0610137 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigMergeHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigMergeHelper.java
@@ -116,7 +116,6 @@ public class ConfigMergeHelper {
         }
       }
 
-
       Collection<String> common = CollectionUtils.intersection(newPairs.keySet(),
           oldPairs.keySet());
 
@@ -128,7 +127,11 @@ public class ConfigMergeHelper {
           savedVal = config.getProperties().get(prop);
         }
 
-        if (!newStackVal.equals(savedVal) &&
+        // If values are not defined in stack (null), we skip them
+        // Or if values in old stack and in new stack are the same, and value
+        // in current config is different, skip it
+        if (!(newStackVal == null && oldStackVal == null)
+                && !newStackVal.equals(savedVal) &&
             (!oldStackVal.equals(newStackVal) || !oldStackVal.equals(savedVal))) {
           ThreeWayValue twv = new ThreeWayValue();
           twv.oldStackValue = normalizeValue(savedVal, oldStackVal.trim());


Mime
View raw message