You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/03/03 18:11:21 UTC

[1/2] ambari git commit: AMBARI-9703. Cannot apply new property set for slider-client through api (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.0 9a45aea84 -> bce910741
  refs/heads/trunk 587924496 -> 42c77f15a


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/42c77f15
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/42c77f15
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/42c77f15

Branch: refs/heads/trunk
Commit: 42c77f15a5897c523fe2c84fc36d78103454f9b6
Parents: 5879244
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Tue Mar 3 19:10:45 2015 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Tue Mar 3 19:10:45 2015 +0200

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/42c77f15/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;


[2/2] ambari git commit: AMBARI-9703. Cannot apply new property set for slider-client through api (aonishuk)

Posted by ao...@apache.org.
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 <ao...@hortonworks.com>
Authored: Tue Mar 3 19:10:47 2015 +0200
Committer: Andrew Onishuk <ao...@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;