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-18655 : Metric level hadoop metrics2 filter is incompatible with AMS HadoopTimelineMetricsSink. (avijayan)
Date Thu, 20 Oct 2016 23:29:50 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 5256a7890 -> dd0cc32b7


AMBARI-18655 : Metric level hadoop metrics2 filter is incompatible with AMS HadoopTimelineMetricsSink.
(avijayan)


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

Branch: refs/heads/trunk
Commit: dd0cc32b71988add58d6e796dc77722a937c28b1
Parents: 5256a78
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Thu Oct 20 16:29:35 2016 -0700
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Thu Oct 20 16:29:35 2016 -0700

----------------------------------------------------------------------
 .../metrics2/sink/timeline/HadoopTimelineMetricsSink.java     | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/dd0cc32b/ambari-metrics/ambari-metrics-hadoop-sink/src/main/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSink.java
----------------------------------------------------------------------
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 d81187e..2bfc6db 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
@@ -298,19 +298,14 @@ public class HadoopTimelineMetricsSink extends AbstractTimelineMetricsSink
imple
       }
 
       int sbBaseLen = sb.length();
-
-      Collection<AbstractMetric> metrics = (Collection<AbstractMetric>) record.metrics();
-
       List<TimelineMetric> metricList = new ArrayList<TimelineMetric>();
       Map<String, String> metadata = null;
       if (skipAggregation) {
         metadata = Collections.singletonMap("skipAggregation", "true");
       }
-
-
       long startTime = record.timestamp();
 
-      for (AbstractMetric metric : metrics) {
+      for (AbstractMetric metric : record.metrics()) {
         sb.append(metric.name());
         String name = sb.toString();
         Number value = metric.value();


Mime
View raw message