ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject ambari git commit: AMBARI-19357. Flume metrics can't show if hostname of flume agent is not lowercase. (Yao Lei via swagle)
Date Fri, 10 Feb 2017 21:31:51 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 4381561f9 -> 38a17a7fb


AMBARI-19357. Flume metrics can't show if hostname of flume agent  is not lowercase. (Yao
Lei via swagle)


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

Branch: refs/heads/trunk
Commit: 38a17a7fb4a27c7ab2bd3d4e87d8ffd0f4150079
Parents: 4381561
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Fri Feb 10 13:31:39 2017 -0800
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Fri Feb 10 13:31:39 2017 -0800

----------------------------------------------------------------------
 .../hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java       | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/38a17a7f/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java
b/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java
index 86e092a..3fdf3f4 100644
--- a/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java
+++ b/ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java
@@ -88,6 +88,8 @@ public class FlumeTimelineMetricsSink extends AbstractTimelineMetricsSink
implem
       if ((hostname == null) || (!hostname.contains("."))) {
         hostname = InetAddress.getLocalHost().getCanonicalHostName();
       }
+      hostname = hostname.toLowerCase();
+
     } catch (UnknownHostException e) {
       LOG.error("Could not identify hostname.");
       throw new FlumeException("Could not identify hostname.", e);


Mime
View raw message