ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnettle...@apache.org
Subject ambari git commit: AMBARI-9139. Deploying Kafka via a Blueprint without Ganglia fails. (rnettleton)
Date Thu, 15 Jan 2015 14:42:48 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 2fe5a5c9f -> 93e79d0d0


AMBARI-9139. Deploying Kafka via a Blueprint without Ganglia fails. (rnettleton)


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

Branch: refs/heads/trunk
Commit: 93e79d0d039f98f5c962b072b7cf49e19dcef89a
Parents: 2fe5a5c
Author: Bob Nettleton <rnettleton@hortonworks.com>
Authored: Thu Jan 15 09:37:22 2015 -0500
Committer: Bob Nettleton <rnettleton@hortonworks.com>
Committed: Thu Jan 15 09:38:11 2015 -0500

----------------------------------------------------------------------
 .../BlueprintConfigurationProcessor.java         |  2 +-
 .../BlueprintConfigurationProcessorTest.java     | 19 +++++++++++++++++--
 2 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/93e79d0d/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 d7b4498..8f84f62 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
@@ -1201,7 +1201,7 @@ public class BlueprintConfigurationProcessor {
     falconStartupPropertiesMap.put("*.falcon.http.authentication.kerberos.principal", new
SingleHostTopologyUpdater("FALCON_SERVER"));
 
     // KAFKA
-    kafkaBrokerMap.put("kafka.ganglia.metrics.host", new SingleHostTopologyUpdater("GANGLIA_SERVER"));
+    kafkaBrokerMap.put("kafka.ganglia.metrics.host", new OptionalSingleHostTopologyUpdater("GANGLIA_SERVER"));
 
     // KNOX
     multiCoreSiteMap.put("hadoop.proxyuser.knox.hosts", new MultipleHostTopologyUpdater("KNOX_GATEWAY"));

http://git-wip-us.apache.org/repos/asf/ambari/blob/93e79d0d/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 167e8fa..c8d1214 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
@@ -1223,7 +1223,7 @@ public class BlueprintConfigurationProcessorTest {
   }
 
   @Test
-  public void testStormConfigClusterUpdateWithoutGangliaServer() throws Exception {
+  public void testStormAndKafkaConfigClusterUpdateWithoutGangliaServer() throws Exception
{
     final String expectedHostGroupName = "host_group_1";
 
     EasyMockSupport mockSupport = new EasyMockSupport();
@@ -1242,13 +1242,18 @@ public class BlueprintConfigurationProcessorTest {
 
     Map<String, String> stormSiteProperties =
       new HashMap<String, String>();
+    Map<String, String> kafkaBrokerProperties =
+      new HashMap<String, String>();
 
     configProperties.put("storm-site", stormSiteProperties);
+    configProperties.put("kafka-broker", kafkaBrokerProperties);
 
     stormSiteProperties.put("worker.childopts", "localhost");
     stormSiteProperties.put("supervisor.childopts", "localhost");
     stormSiteProperties.put("nimbus.childopts", "localhost");
 
+    kafkaBrokerProperties.put("kafka.ganglia.metrics.host", "localhost");
+
 
     // setup properties that include host information
 
@@ -1273,11 +1278,14 @@ public class BlueprintConfigurationProcessorTest {
     assertEquals("nimbus startup settings not properly handled by cluster create",
       "localhost", stormSiteProperties.get("nimbus.childopts"));
 
+    assertEquals("Kafka ganglia host property not properly handled by cluster create",
+      "localhost", kafkaBrokerProperties.get("kafka.ganglia.metrics.host"));
+
     mockSupport.verifyAll();
   }
 
   @Test
-  public void testStormConfigClusterUpdateWithGangliaServer() throws Exception {
+  public void testStormandKafkaConfigClusterUpdateWithGangliaServer() throws Exception {
     final String expectedHostName = "c6401.apache.ambari.org";
     final String expectedHostGroupName = "host_group_1";
 
@@ -1297,13 +1305,17 @@ public class BlueprintConfigurationProcessorTest {
 
     Map<String, String> stormSiteProperties =
       new HashMap<String, String>();
+    Map<String, String> kafkaBrokerProperties =
+      new HashMap<String, String>();
 
     configProperties.put("storm-site", stormSiteProperties);
+    configProperties.put("kafka-broker", kafkaBrokerProperties);
 
     stormSiteProperties.put("worker.childopts", "localhost");
     stormSiteProperties.put("supervisor.childopts", "localhost");
     stormSiteProperties.put("nimbus.childopts", "localhost");
 
+    kafkaBrokerProperties.put("kafka.ganglia.metrics.host", "localhost");
 
     // setup properties that include host information
 
@@ -1328,6 +1340,9 @@ public class BlueprintConfigurationProcessorTest {
     assertEquals("nimbus startup settings not properly handled by cluster create",
       expectedHostName, stormSiteProperties.get("nimbus.childopts"));
 
+    assertEquals("Kafka ganglia host property not properly handled by cluster create",
+      expectedHostName, kafkaBrokerProperties.get("kafka.ganglia.metrics.host"));
+
     mockSupport.verifyAll();
   }
 


Mime
View raw message