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-8594. Push AMS Hbase metrics with its own appid. Unit test fix. (swagle)
Date Tue, 09 Dec 2014 17:34:42 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 1f950c054 -> cff01d6ff


AMBARI-8594. Push AMS Hbase metrics with its own appid. Unit test fix. (swagle)


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

Branch: refs/heads/trunk
Commit: cff01d6ffda174c6a5be34de5d41a3f638c9a3dd
Parents: 1f950c0
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Tue Dec 9 09:32:16 2014 -0800
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Tue Dec 9 09:34:38 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/cff01d6f/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 0755f51..fb061a9 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
@@ -110,7 +110,7 @@ public class HadoopTimelineMetricsSink extends AbstractTimelineMetricsSink
imple
   private String getServiceName(SubsetConfiguration conf) {
     String serviceNamePrefix = conf.getString(SERVICE_NAME_PREFIX, "");
     return serviceNamePrefix.isEmpty() ? getFirstConfigPrefix(conf) :
-      serviceNamePrefix + "-" + getFirstConfigPrefix(conf);
+           serviceNamePrefix + "-" + getFirstConfigPrefix(conf);
   }
 
   private String getFirstConfigPrefix(SubsetConfiguration conf) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/cff01d6f/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 2421a73..3c83868 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
@@ -50,6 +50,7 @@ public class HadoopTimelineMetricsSinkTest {
     expect(conf.getParent()).andReturn(null).anyTimes();
     expect(conf.getPrefix()).andReturn("service").anyTimes();
     expect(conf.getString(eq(COLLECTOR_HOST_PROPERTY))).andReturn("localhost:63188").anyTimes();
+    expect(conf.getString(eq("serviceName-prefix"), eq(""))).andReturn("").anyTimes();
 
     expect(conf.getInt(eq(MAX_METRIC_ROW_CACHE_SIZE), anyInt())).andReturn(10).anyTimes();
     expect(conf.getInt(eq(METRICS_SEND_INTERVAL), anyInt())).andReturn(1000).anyTimes();


Mime
View raw message