ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject ambari git commit: AMBARI-16968 Capture user based metrics for Namenode fair call queue. (dsen)
Date Tue, 31 May 2016 20:08:25 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk bef695d3f -> 24cab91a9


AMBARI-16968 Capture user based metrics for Namenode fair call queue. (dsen)


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

Branch: refs/heads/trunk
Commit: 24cab91a991735ce1a893810d1a0cd9e4f926ba1
Parents: bef695d
Author: Dmytro Sen <dsen@apache.org>
Authored: Tue May 31 23:08:18 2016 +0300
Committer: Dmytro Sen <dsen@apache.org>
Committed: Tue May 31 23:08:18 2016 +0300

----------------------------------------------------------------------
 .../metrics2/sink/timeline/HadoopTimelineMetricsSink.java   | 9 +++++++++
 .../sink/timeline/HadoopTimelineMetricsSinkTest.java        | 1 -
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/24cab91a/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 8c4766f..ff44169 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
@@ -221,6 +221,15 @@ public class HadoopTimelineMetricsSink extends AbstractTimelineMetricsSink
imple
       String contextName = record.context();
 
       StringBuilder sb = new StringBuilder();
+
+      // Transform ipc.8020 -> ipc.client,  ipc.8040 -> ipc.datanode, etc.
+      if (contextName.startsWith("ipc.")) {
+        String portNumber = contextName.replaceFirst("ipc.", "");
+        if (rpcPortSuffixes.containsKey(portNumber)) {
+          contextName = "ipc." + rpcPortSuffixes.get(portNumber);
+        }
+      }
+
       sb.append(contextName);
       sb.append('.');
       // Similar to GangliaContext adding processName to distinguish jvm

http://git-wip-us.apache.org/repos/asf/ambari/blob/24cab91a/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
b/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
index aeeee4f..1d7a0fb 100644
--- a/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
+++ b/ambari-metrics/ambari-metrics-hadoop-sink/src/test/java/org/apache/hadoop/metrics2/sink/timeline/HadoopTimelineMetricsSinkTest.java
@@ -26,7 +26,6 @@ import org.apache.hadoop.metrics2.MetricType;
 import org.apache.hadoop.metrics2.MetricsInfo;
 import org.apache.hadoop.metrics2.MetricsRecord;
 import org.apache.hadoop.metrics2.MetricsTag;
-import org.apache.hadoop.metrics2.sink.timeline.availability.MetricCollectorHAHelper;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.easymock.EasyMock;


Mime
View raw message