You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vb...@apache.org on 2014/08/14 15:48:12 UTC

git commit: AMBARI-6850. Upgrade from 1.6.0 -> 1.7.0 fails.(vbrodetskyi)

Repository: ambari
Updated Branches:
  refs/heads/trunk 5321aeaf4 -> 932202d7c


AMBARI-6850. Upgrade from 1.6.0 -> 1.7.0 fails.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 932202d7c7951f4d90e77756a134fffbe75d1aba
Parents: 5321aea
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Thu Aug 14 15:48:29 2014 +0300
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Thu Aug 14 15:48:29 2014 +0300

----------------------------------------------------------------------
 .../controller/AmbariManagementControllerImpl.java    | 14 +++++++++++++-
 .../controller/AmbariManagementControllerTest.java    |  3 ++-
 2 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/932202d7/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 9cf5de9..59544dd 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
@@ -668,7 +668,19 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
           tag = "version" + System.currentTimeMillis();
         }
 
-        createConfig(cluster, configTypeName, properties, tag, propertiesAttributes);
+        Config config = createConfig(cluster, configTypeName, properties, tag, propertiesAttributes);
+
+        if (config != null) {
+          String authName = getAuthName();
+
+          if (cluster.addDesiredConfig(authName, config) != null) {
+            LOG.info("cluster '" + cluster.getClusterName() + "' "
+                    + "changed by: '" + authName + "'; "
+                    + "type='" + config.getType() + "' "
+                    + "tag='" + config.getTag());
+          }
+        }
+
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/932202d7/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index 43c49de..fe2023e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -8947,10 +8947,11 @@ public class AmbariManagementControllerTest {
       amc.createConfiguration(configurationRequest);
 
       configurationRequest = new ConfigurationRequest("c1", "global", "version1",
-          gson.<Map<String, String>>fromJson("{ \"hbase_hdfs_root_dir\" : \"/apps/hbase/\"}", confType), null
+          gson.<Map<String, String>>fromJson("{ \"hive.server2.enable.doAs\" : \"true\"}", confType), null
       );
       amc.createConfiguration(configurationRequest);
 
+      Assert.assertTrue(clusters.getCluster("c1").getDesiredConfigs().containsKey("hive-site"));
 
       serviceRequests.clear();
       serviceRequests.add(new ServiceRequest("c1", "HDFS", null));