This is an automated email from the ASF dual-hosted git repository.

apappu pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new 7407f75  [AMBARI-25301] Ambari metrics HA does not work in 2.7.x for 
Hbase/any /services (apappu)
     new 6f5fb03  Merge pull request #3006 from apappu/AMBARI-25301-branch-2.7
7407f75 is described below

commit 7407f75dbf9522d9dcb9a0168edec5ce351dc89e
Author: root <apa...@hortonworks.com>
AuthorDate: Tue Jun 11 23:16:15 2019 +0000

    [AMBARI-25301] Ambari metrics HA does not work in 2.7.x for Hbase/any 
/services (apappu)
---
 .../hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
 
b/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
index 1a4a5fd..0a38bdd 100644
--- 
a/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
+++ 
b/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
@@ -108,7 +108,12 @@ public class HadoopTimelineMetricsSink extends 
AbstractTimelineMetricsSink imple
 
     // Load collector configs
     protocol = conf.getString(COLLECTOR_PROTOCOL, "http");
-    collectorHosts = 
parseHostsStringArrayIntoCollection(conf.getStringArray(COLLECTOR_HOSTS_PROPERTY));
+    String collectorHostStr = conf.getString(COLLECTOR_HOSTS_PROPERTY);
+    String[] collectorHostArr = null;
+    if(collectorHostStr !=null) {
+      collectorHostArr = collectorHostStr.split(",");
+    }
+    collectorHosts = parseHostsStringArrayIntoCollection(collectorHostArr);
     port = conf.getString(COLLECTOR_PORT, "6188");
     hostInMemoryAggregationEnabled = 
conf.getBoolean(HOST_IN_MEMORY_AGGREGATION_ENABLED_PROPERTY, false);
     hostInMemoryAggregationPort = 
conf.getInt(HOST_IN_MEMORY_AGGREGATION_PORT_PROPERTY, 61888);

Reply via email to