ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbrodets...@apache.org
Subject ambari git commit: AMBARI-9238. Blueprint is installing MySQL even when using "Existing MySQL" Hive option.(vbrodetskyi)
Date Wed, 21 Jan 2015 15:40:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk b2d57da6d -> 2f41d1952


AMBARI-9238. Blueprint is installing MySQL even when using "Existing MySQL" Hive option.(vbrodetskyi)


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

Branch: refs/heads/trunk
Commit: 2f41d19522b8851ce44a3b997388a62f7c7a7fa5
Parents: b2d57da
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Fri Jan 9 13:25:10 2015 +0200
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Fri Jan 9 13:25:10 2015 +0200

----------------------------------------------------------------------
 .../ambari/server/orm/entities/BlueprintEntity.java       | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2f41d195/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintEntity.java
b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintEntity.java
index 516dd2f..36a0f26 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/BlueprintEntity.java
@@ -190,6 +190,16 @@ public class BlueprintEntity {
 
       operationalConfiguration.putAll(getConfigurationAsMap(hostGroup.getConfigurations()));
       for (HostGroupComponentEntity component : hostGroup.getComponents()) {
+        //check that MYSQL_SERVER component is not available while hive using existing db
+        if (component.getName().equals("MYSQL_SERVER")) {
+          Map<String, String> hiveEnvConfig = clusterConfigurations.get("hive-env");
+          if (hiveEnvConfig != null && !hiveEnvConfig.isEmpty() && hiveEnvConfig.get("hive_database")
!= null
+                  && hiveEnvConfig.get("hive_database").startsWith("Existing")) {
+            throw new IllegalArgumentException("Incorrect configuration: MYSQL_SERVER component
is available but hive" +
+                    " using existing db!");
+          }
+        }
+
         //for now, AMBARI is not recognized as a service in Stacks
         if (! component.getName().equals("AMBARI_SERVER")) {
           ServiceInfo service;


Mime
View raw message