You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2017/02/10 21:31:51 UTC
ambari git commit: AMBARI-19357. Flume metrics can't show if hostname
of flume agent is not lowercase. (Yao Lei via swagle)
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 <sw...@hortonworks.com>
Authored: Fri Feb 10 13:31:39 2017 -0800
Committer: Siddharth Wagle <sw...@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);