AMBARI-9703. Cannot apply new property set for slider-client through api 
(aonishuk)


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

Branch: refs/heads/branch-2.0.0
Commit: bce9107416cb8f15c00715be0cd4f7710d61ba06
Parents: 9a45aea
Author: Andrew Onishuk <aonis...@hortonworks.com>
Authored: Tue Mar 3 19:10:47 2015 +0200
Committer: Andrew Onishuk <aonis...@hortonworks.com>
Committed: Tue Mar 3 19:10:47 2015 +0200

----------------------------------------------------------------------
 .../server/controller/AmbariManagementControllerImpl.java   | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bce91074/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index dcbbed2..ac91377 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -1214,6 +1214,15 @@ public class AmbariManagementControllerImpl implements 
AmbariManagementControlle
         } else {
           isConfigurationCreationNeeded = true;
         }
+        if (requestConfigProperties == null || 
requestConfigProperties.isEmpty()) {
+          Config existingConfig = cluster.getConfig(desiredConfig.getType(), 
desiredConfig.getVersionTag());
+          if (existingConfig != null) {
+            if (!StringUtils.equals(existingConfig.getTag(), 
clusterConfig.getTag())) {
+              isConfigurationCreationNeeded = true;
+              break;
+            }
+          }
+        }
         if (requestConfigProperties != null && clusterConfigProperties != 
null) {
           if (requestConfigProperties.size() != 
clusterConfigProperties.size()) {
             isConfigurationCreationNeeded = true;

Reply via email to