ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject ambari git commit: AMBARI-13404 Exported blueprint contains unmasked hostname in ["drpc_server_host":"storm-site", "storm_ui_server_host":"storm-site", "supervisor_hosts":"storm-site", "nimbus_hosts":"storm-site"] (dsen)
Date Thu, 15 Oct 2015 17:33:14 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 70c8adac7 -> ecd37040c


AMBARI-13404 Exported blueprint contains unmasked hostname in ["drpc_server_host":"storm-site",
"storm_ui_server_host":"storm-site", "supervisor_hosts":"storm-site", "nimbus_hosts":"storm-site"]
(dsen)


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

Branch: refs/heads/branch-2.1
Commit: ecd37040c262c3749965f8d31bdbfc7e1c7feefe
Parents: 70c8ada
Author: Dmytro Sen <dsen@apache.org>
Authored: Thu Oct 15 20:28:39 2015 +0300
Committer: Dmytro Sen <dsen@apache.org>
Committed: Thu Oct 15 20:32:49 2015 +0300

----------------------------------------------------------------------
 .../internal/BlueprintConfigurationProcessor.java  |  5 +++++
 .../BlueprintConfigurationProcessorTest.java       | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ecd37040/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
index 892cf32..223db51 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessor.java
@@ -2018,9 +2018,14 @@ public class BlueprintConfigurationProcessor {
 
     // STORM
     stormSiteMap.put("nimbus.host", new SingleHostTopologyUpdater("NIMBUS"));
+    stormSiteMap.put("nimbus_hosts", new SingleHostTopologyUpdater("NIMBUS"));
+    stormSiteMap.put("drpc_server_host", new SingleHostTopologyUpdater("DRPC_SERVER"));
+    stormSiteMap.put("storm_ui_server_host", new SingleHostTopologyUpdater("STORM_UI_SERVER"));
     stormSiteMap.put("worker.childopts", new OptionalSingleHostTopologyUpdater("GANGLIA_SERVER"));
     stormSiteMap.put("supervisor.childopts", new OptionalSingleHostTopologyUpdater("GANGLIA_SERVER"));
     stormSiteMap.put("nimbus.childopts", new OptionalSingleHostTopologyUpdater("GANGLIA_SERVER"));
+    multiStormSiteMap.put("supervisor_hosts",
+        new YamlMultiValuePropertyDecorator(new MultipleHostTopologyUpdater("SUPERVISOR")));
     multiStormSiteMap.put("storm.zookeeper.servers",
         new YamlMultiValuePropertyDecorator(new MultipleHostTopologyUpdater("ZOOKEEPER_SERVER")));
     multiStormSiteMap.put("nimbus.seeds",

http://git-wip-us.apache.org/repos/asf/ambari/blob/ecd37040/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
index a97ca74..7181bb6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
@@ -443,6 +443,10 @@ public class BlueprintConfigurationProcessorTest {
     Map<String, Map<String, String>> properties = new HashMap<String, Map<String,
String>>();
     Map<String, String> typeProps = new HashMap<String, String>();
     typeProps.put("storm.zookeeper.servers", "['testhost:5050','testhost2:9090','testhost2a:9090','testhost2b:9090']");
+    typeProps.put("drpc_server_host", "['testhost:5050']");
+    typeProps.put("storm_ui_server_host", "['testhost:5050']");
+    typeProps.put("supervisor_hosts", "['testhost:5050','testhost2:9090']");
+
     properties.put("storm-site", typeProps);
 
     Configuration clusterConfig = new Configuration(properties,
@@ -452,12 +456,16 @@ public class BlueprintConfigurationProcessorTest {
     hgComponents.add("NAMENODE");
     hgComponents.add("SECONDARY_NAMENODE");
     hgComponents.add("ZOOKEEPER_SERVER");
+    hgComponents.add("DRPC_SERVER");
+    hgComponents.add("STORM_UI_SERVER");
+    hgComponents.add("SUPERVISOR");
     TestHostGroup group1 = new TestHostGroup("group1", hgComponents, Collections.singleton("testhost"));
 
     Collection<String> hgComponents2 = new HashSet<String>();
     hgComponents2.add("DATANODE");
     hgComponents2.add("HDFS_CLIENT");
     hgComponents2.add("ZOOKEEPER_SERVER");
+    hgComponents2.add("SUPERVISOR");
     Set<String> hosts2 = new HashSet<String>();
     hosts2.add("testhost2");
     hosts2.add("testhost2a");
@@ -483,6 +491,15 @@ public class BlueprintConfigurationProcessorTest {
 
     String updatedVal = properties.get("storm-site").get("storm.zookeeper.servers");
     assertEquals("['%HOSTGROUP::group1%:5050','%HOSTGROUP::group2%:9090']", updatedVal);
+
+    String updatedVa2 = properties.get("storm-site").get("drpc_server_host");
+    assertEquals("['%HOSTGROUP::group1%:5050']", updatedVa2);
+
+    String updatedVa3 = properties.get("storm-site").get("storm_ui_server_host");
+    assertEquals("['%HOSTGROUP::group1%:5050']", updatedVa3);
+
+    String updatedVa4 = properties.get("storm-site").get("supervisor_hosts");
+    assertEquals("['%HOSTGROUP::group1%:5050','%HOSTGROUP::group2%:9090']", updatedVa4);
   }
 
   @Test


Mime
View raw message