ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avija...@apache.org
Subject ambari git commit: AMBARI-19134 : Storm start is failing due to ClassNotFoundException org.apache.hadoop.metrics2.sink.storm.StormTimelineMetricsReporter. (avijayan)
Date Thu, 08 Dec 2016 20:58:18 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk a27c0dd34 -> b2a8edf8e


AMBARI-19134 : Storm start is failing due to ClassNotFoundException org.apache.hadoop.metrics2.sink.storm.StormTimelineMetricsReporter.
(avijayan)


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

Branch: refs/heads/trunk
Commit: b2a8edf8edf77ae49d4b922590f6d4dcdedc5e4d
Parents: a27c0dd
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Thu Dec 8 12:58:07 2016 -0800
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Thu Dec 8 12:58:07 2016 -0800

----------------------------------------------------------------------
 .../metrics2/sink/timeline/AbstractTimelineMetricsSink.java     | 5 +++++
 .../sink/timeline/cache/HandleConnectExceptionTest.java         | 4 ++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b2a8edf8/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
index f92f968..9bc3be5 100644
--- a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
+++ b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/AbstractTimelineMetricsSink.java
@@ -222,6 +222,11 @@ public abstract class AbstractTimelineMetricsSink {
       collectorHost = findPreferredCollectHost();
     }
 
+    if (collectorHost == null) {
+      LOG.warn("No live collector to send metrics to. Metrics to be sent will be discarded.");
+      return false;
+    }
+
     String connectUrl = getCollectorUri(collectorHost);
     String jsonData = null;
     LOG.debug("EmitMetrics connectUrl = "  + connectUrl);

http://git-wip-us.apache.org/repos/asf/ambari/blob/b2a8edf8/ambari-metrics/ambari-metrics-common/src/test/java/org/apache/hadoop/metrics2/sink/timeline/cache/HandleConnectExceptionTest.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-common/src/test/java/org/apache/hadoop/metrics2/sink/timeline/cache/HandleConnectExceptionTest.java
b/ambari-metrics/ambari-metrics-common/src/test/java/org/apache/hadoop/metrics2/sink/timeline/cache/HandleConnectExceptionTest.java
index 36ec074..32fe32e 100644
--- a/ambari-metrics/ambari-metrics-common/src/test/java/org/apache/hadoop/metrics2/sink/timeline/cache/HandleConnectExceptionTest.java
+++ b/ambari-metrics/ambari-metrics-common/src/test/java/org/apache/hadoop/metrics2/sink/timeline/cache/HandleConnectExceptionTest.java
@@ -130,6 +130,10 @@ public class HandleConnectExceptionTest {
       return super.emitMetrics(metrics);
     }
 
+    @Override
+    protected synchronized String findPreferredCollectHost() {
+      return "localhost";
+    }
 
   }
 }


Mime
View raw message