You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by av...@apache.org on 2016/06/30 17:53:20 UTC

ambari git commit: Revert "AMBARI-17027: Metrics Collector API: Introduce basic series aggregation functions (Jungtaek Lim via avijayan)"

Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 1c29d347c -> 3ba8ab6fc


Revert "AMBARI-17027: Metrics Collector API: Introduce basic series aggregation functions (Jungtaek Lim via avijayan)"

This reverts commit 1c29d347c48f9e188942bed12a224bd5cbca7ce7.


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

Branch: refs/heads/branch-2.4
Commit: 3ba8ab6fcb142cb0a61ef5f04dd75788c52cec94
Parents: 1c29d34
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Thu Jun 30 10:53:13 2016 -0700
Committer: Aravindan Vijayan <av...@hortonworks.com>
Committed: Thu Jun 30 10:53:13 2016 -0700

----------------------------------------------------------------------
 .../ambari-metrics/datasource.js                | 22 +++++---------
 .../ambari-metrics/partials/query.editor.html   | 12 --------
 .../ambari-metrics/queryCtrl.js                 |  8 +----
 .../timeline/HBaseTimelineMetricStore.java      | 32 ++------------------
 .../metrics/timeline/TimelineMetricStore.java   |  4 +--
 .../timeline/TimelineMetricStoreWatcher.java    |  2 +-
 .../webapp/TimelineWebServices.java             |  8 ++---
 .../timeline/TestTimelineMetricStore.java       |  3 +-
 .../TimelineMetricStoreWatcherTest.java         |  5 ++-
 9 files changed, 19 insertions(+), 77 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8ab6f/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
index 66043c5..6a4f01b 100644
--- a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
+++ b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/datasource.js
@@ -165,10 +165,9 @@ define([
             + target.precision;
             var metricAggregator = target.aggregator === "none" ? '' : '._' + target.aggregator;
             var metricTransform = !target.transform || target.transform === "none" ? '' : '._' + target.transform;
-            var seriesAggregator = !target.seriesAggregator || target.seriesAggregator === "none" ? '' : '&seriesAggregateFunction=' + target.seriesAggregator;
             return backendSrv.get(self.url + '/ws/v1/timeline/metrics?metricNames=' + target.metric + metricTransform +
                 metricAggregator + "&hostname=" + target.hosts + '&appId=' + target.app + '&startTime=' + from +
-                '&endTime=' + to + precision + seriesAggregator).then(
+                '&endTime=' + to + precision).then(
                 getMetricsData(target)
             );
           };
@@ -187,10 +186,9 @@ define([
             + target.precision;
             var metricAggregator = target.aggregator === "none" ? '' : '._' + target.aggregator;
             var metricTransform = !target.transform || target.transform === "none" ? '' : '._' + target.transform;
-            var seriesAggregator = !target.seriesAggregator || target.seriesAggregator === "none" ? '' : '&seriesAggregateFunction=' + target.seriesAggregator;
             return backendSrv.get(self.url + '/ws/v1/timeline/metrics?metricNames=' + target.metric + metricTransform
               + metricAggregator + '&hostname=' + tHost + '&appId=' + target.app + '&startTime=' + from +
-              '&endTime=' + to + precision + seriesAggregator).then(
+              '&endTime=' + to + precision).then(
               getMetricsData(target)
             );
           };
@@ -208,11 +206,10 @@ define([
               topN = '&topN=' + metricTopN[0].current.value  +'&topNFunction=' + metricTopAgg[0].current.value  + '&isBottomN='+ isBottomN;
             }
             var metricTransform = !target.transform || target.transform === "none" ? '' : '._' + target.transform;
-            var seriesAggregator = !target.seriesAggregator || target.seriesAggregator === "none" ? '' : '&seriesAggregateFunction=' + target.seriesAggregator;
             var templatedComponent = (_.isEmpty(tComponent)) ? target.app : tComponent;
             return backendSrv.get(self.url + '/ws/v1/timeline/metrics?metricNames=' + target.metric + metricTransform
               + metricAggregator + '&hostname=' + target.templatedHost + '&appId=' + templatedComponent + '&startTime=' + from +
-              '&endTime=' + to + precision + topN + seriesAggregator).then(
+              '&endTime=' + to + precision + topN).then(
               allHostMetricsData(target)
             );
           };
@@ -221,19 +218,17 @@ define([
             + target.precision;
             var metricAggregator = target.aggregator === "none" ? '' : '._' + target.aggregator;
             var metricTransform = !target.transform || target.transform === "none" ? '' : '._' + target.transform;
-            var seriesAggregator = !target.seriesAggregator || target.seriesAggregator === "none" ? '' : '&seriesAggregateFunction=' + target.seriesAggregator;
             return backendSrv.get(self.url + '/ws/v1/timeline/metrics?metricNames=' + target.queue + metricTransform
               + metricAggregator + '&appId=resourcemanager&startTime=' + from +
-              '&endTime=' + to + precision + seriesAggregator).then(
+              '&endTime=' + to + precision).then(
               getMetricsData(target)
             );
           };
           var getHbaseAppIdData = function(target) {
             var precision = target.precision === 'default' || typeof target.precision == 'undefined'  ? '' : '&precision='
             + target.precision;
-            var seriesAggregator = !target.seriesAggregator || target.seriesAggregator === "none" ? '' : '&seriesAggregateFunction=' + target.seriesAggregator;
             return backendSrv.get(self.url + '/ws/v1/timeline/metrics?metricNames=' + target.hbMetric + '&appId=hbase&startTime=' 
-            + from + '&endTime=' + to + precision + seriesAggregator).then(
+            + from + '&endTime=' + to + precision).then(
               allHostMetricsData(target)
             );
           };
@@ -243,10 +238,9 @@ define([
             + target.precision;
             var metricAggregator = target.aggregator === "none" ? '' : '._' + target.aggregator;
             var metricTransform = !target.transform || target.transform === "none" ? '' : '._' + target.transform;
-            var seriesAggregator = !target.seriesAggregator || target.seriesAggregator === "none" ? '' : '&seriesAggregateFunction=' + target.seriesAggregator;
             return backendSrv.get(self.url + '/ws/v1/timeline/metrics?metricNames=' + target.kbMetric + metricTransform
               + metricAggregator + '&appId=kafka_broker&startTime=' + from +
-              '&endTime=' + to + precision + seriesAggregator).then(
+              '&endTime=' + to + precision).then(
               getMetricsData(target)
             );
           };
@@ -255,9 +249,8 @@ define([
             + target.precision;
             var metricAggregator = target.aggregator === "none" ? '' : '._' + target.aggregator;
             var metricTransform = !target.transform || target.transform === "none" ? '' : '._' + target.transform;
-            var seriesAggregator = !target.seriesAggregator || target.seriesAggregator === "none" ? '' : '&seriesAggregateFunction=' + target.seriesAggregator;
             return backendSrv.get(self.url + '/ws/v1/timeline/metrics?metricNames=' + target.nnMetric + metricTransform
-            + metricAggregator + '&appId=namenode&startTime=' + from + '&endTime=' + to + precision + seriesAggregator).then(
+            + metricAggregator + '&appId=namenode&startTime=' + from + '&endTime=' + to + precision).then(
               allHostMetricsData(target)
             );
           };
@@ -679,7 +672,6 @@ define([
           ]);
           return aggregatorsPromise;
         };
-
         return AmbariMetricsDatasource;
       });
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8ab6f/ambari-metrics/ambari-metrics-grafana/ambari-metrics/partials/query.editor.html
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/partials/query.editor.html b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/partials/query.editor.html
index 3f322c1..b034c03 100644
--- a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/partials/query.editor.html
+++ b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/partials/query.editor.html
@@ -109,7 +109,6 @@
                 <i class="fa fa-warning"></i>
             </a>
         </li>
-
     </ul>
 
     <div class="clearfix"></div>
@@ -151,16 +150,5 @@
                     ng-change="targetBlur()">
             </select>
         </li>
-
-        <li class="tight-form-item">
-            Series Aggregator
-        </li>
-        <li>
-            <select ng-model="target.seriesAggregator" class="tight-form-input input-small"
-                    ng-options="seriesAggregator for seriesAggregator in seriesAggregators"
-                    ng-init="seriesAggregator()"
-                    ng-change="targetBlur()">
-            </select>
-        </li>
     <div class="clearfix"></div>
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8ab6f/ambari-metrics/ambari-metrics-grafana/ambari-metrics/queryCtrl.js
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/queryCtrl.js b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/queryCtrl.js
index a26e7d0..2eb3613 100644
--- a/ambari-metrics/ambari-metrics-grafana/ambari-metrics/queryCtrl.js
+++ b/ambari-metrics/ambari-metrics-grafana/ambari-metrics/queryCtrl.js
@@ -31,7 +31,6 @@ define([
           $scope.aggregators = ['none','avg', 'sum', 'min', 'max'];
           $scope.precisions = ['default','seconds', 'minutes', 'hours', 'days'];
           $scope.transforms = ['none','diff','rate'];
-          $scope.seriesAggregators = ['none', 'avg', 'sum', 'min', 'max'];
 
           if (!$scope.target.aggregator) {
             $scope.target.aggregator = 'avg';
@@ -46,11 +45,6 @@ define([
                 $scope.target.transform = "none";
            }
           };
-          $scope.seriesAggregator = function () {
-           if (typeof $scope.target.seriesAggregator == 'undefined') {
-                $scope.target.seriesAggregator = "none";
-           }
-          };
           $scope.$watch('target.app', function (newValue) {
             if (newValue === '') {
               $scope.target.metric = '';
@@ -150,4 +144,4 @@ define([
         $scope.init();
       });
 
-    });
+    });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8ab6f/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
index 9510574..f1e42e4 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/HBaseTimelineMetricStore.java
@@ -17,6 +17,7 @@
  */
 package org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline;
 
+
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -35,9 +36,6 @@ import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.
 import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.aggregators.TimelineMetricAggregatorFactory;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.discovery.TimelineMetricMetadataKey;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.discovery.TimelineMetricMetadataManager;
-import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.function.SeriesAggregateFunction;
-import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.function.TimelineMetricsSeriesAggregateFunction;
-import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.function.TimelineMetricsSeriesAggregateFunctionFactory;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.query.Condition;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.query.ConditionBuilder;
 import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.query.TopNCondition;
@@ -45,7 +43,6 @@ import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.
 import java.io.IOException;
 import java.sql.SQLException;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -166,7 +163,7 @@ public class HBaseTimelineMetricStore extends AbstractService implements Timelin
   public TimelineMetrics getTimelineMetrics(List<String> metricNames,
       List<String> hostnames, String applicationId, String instanceId,
       Long startTime, Long endTime, Precision precision, Integer limit,
-      boolean groupedByHosts, TopNConfig topNConfig, String seriesAggregateFunction) throws SQLException, IOException {
+      boolean groupedByHosts, TopNConfig topNConfig) throws SQLException, IOException {
 
     if (metricNames == null || metricNames.isEmpty()) {
       throw new IllegalArgumentException("No metric name filter specified.");
@@ -178,13 +175,6 @@ public class HBaseTimelineMetricStore extends AbstractService implements Timelin
     if (limit != null && limit > PhoenixHBaseAccessor.RESULTSET_LIMIT){
       throw new IllegalArgumentException("Limit too big");
     }
-
-    TimelineMetricsSeriesAggregateFunction seriesAggrFunctionInstance = null;
-    if (!StringUtils.isEmpty(seriesAggregateFunction)) {
-      SeriesAggregateFunction func = SeriesAggregateFunction.getFunction(seriesAggregateFunction);
-      seriesAggrFunctionInstance = TimelineMetricsSeriesAggregateFunctionFactory.newInstance(func);
-    }
-
     Map<String, List<Function>> metricFunctions =
       parseMetricNamesToAggregationFunctions(metricNames);
 
@@ -224,14 +214,7 @@ public class HBaseTimelineMetricStore extends AbstractService implements Timelin
     } else {
       metrics = hBaseAccessor.getMetricRecords(condition, metricFunctions);
     }
-
-    metrics = postProcessMetrics(metrics);
-
-    if (metrics.getMetrics().size() == 0) {
-      return metrics;
-    }
-
-    return seriesAggregateMetrics(seriesAggrFunctionInstance, metrics);
+    return postProcessMetrics(metrics);
   }
 
   private TimelineMetrics postProcessMetrics(TimelineMetrics metrics) {
@@ -249,15 +232,6 @@ public class HBaseTimelineMetricStore extends AbstractService implements Timelin
     return metrics;
   }
 
-  private TimelineMetrics seriesAggregateMetrics(TimelineMetricsSeriesAggregateFunction seriesAggrFuncInstance,
-      TimelineMetrics metrics) {
-    if (seriesAggrFuncInstance != null) {
-      TimelineMetric appliedMetric = seriesAggrFuncInstance.apply(metrics);
-      metrics.setMetrics(Collections.singletonList(appliedMetric));
-    }
-    return metrics;
-  }
-
   static Map<Long, Double> updateValuesAsRate(Map<Long, Double> metricValues, boolean isDiff) {
     Long prevTime = null;
     Double prevVal = null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8ab6f/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStore.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStore.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStore.java
index 3a8dc55..3e70330 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStore.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStore.java
@@ -44,8 +44,6 @@ public interface TimelineMetricStore {
    * @param limit Override default result limit
    * @param groupedByHosts Group {@link TimelineMetric} by metric name, hostname,
    *                app id and instance id
-   * @param seriesAggregateFunction Specify this when caller want to aggregate multiple metrics
-   *                                series into one. [ SUM, AVG, MIN, MAX ]
    *
    * @return {@link TimelineMetric}
    * @throws java.sql.SQLException
@@ -53,7 +51,7 @@ public interface TimelineMetricStore {
   TimelineMetrics getTimelineMetrics(List<String> metricNames, List<String> hostnames,
                                      String applicationId, String instanceId, Long startTime,
                                      Long endTime, Precision precision, Integer limit, boolean groupedByHosts,
-                                     TopNConfig topNConfig, String seriesAggregateFunction)
+                                     TopNConfig topNConfig)
     throws SQLException, IOException;
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8ab6f/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStoreWatcher.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStoreWatcher.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStoreWatcher.java
index aa53430..7d49070 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStoreWatcher.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStoreWatcher.java
@@ -105,7 +105,7 @@ public class TimelineMetricStoreWatcher implements Runnable {
         TimelineMetrics timelineMetrics = timelineMetricStore.getTimelineMetrics(
           Collections.singletonList(FAKE_METRIC_NAME), Collections.singletonList(FAKE_HOSTNAME),
           FAKE_APP_ID, null, startTime - delay * 2 * 1000,
-          startTime + delay * 2 * 1000, Precision.SECONDS, 1, true, null, null);
+          startTime + delay * 2 * 1000, Precision.SECONDS, 1, true, null);
         return timelineMetrics.getMetrics().get(0);
       }
     };

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8ab6f/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java
index df9aa1f..2616c99 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/webapp/TimelineWebServices.java
@@ -343,8 +343,7 @@ public class TimelineWebServices {
     @QueryParam("grouped") String grouped,
     @QueryParam("topN") String topN,
     @QueryParam("topNFunction") String topNFunction,
-    @QueryParam("isBottomN") String isBottomN,
-    @QueryParam("seriesAggregateFunction") String seriesAggregateFunction
+    @QueryParam("isBottomN") String isBottomN
   ) {
     init(res);
     try {
@@ -353,15 +352,14 @@ public class TimelineWebServices {
           "appId: " + appId + ", instanceId: " + instanceId + ", " +
           "hostname: " + hostname + ", startTime: " + startTime + ", " +
           "endTime: " + endTime + ", " +
-          "precision: " + precision + "seriesAggregateFunction: " + seriesAggregateFunction);
+          "precision: " + precision);
       }
 
       return timelineMetricStore.getTimelineMetrics(
         parseListStr(metricNames, ","), parseListStr(hostname, ","), appId, instanceId,
         parseLongStr(startTime), parseLongStr(endTime),
         Precision.getPrecision(precision), parseIntStr(limit),
-        parseBoolean(grouped), parseTopNConfig(topN, topNFunction, isBottomN),
-        seriesAggregateFunction);
+        parseBoolean(grouped), parseTopNConfig(topN, topNFunction, isBottomN));
 
     } catch (NumberFormatException ne) {
       throw new BadRequestException("startTime and limit should be numeric " +

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8ab6f/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestTimelineMetricStore.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestTimelineMetricStore.java b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestTimelineMetricStore.java
index f30be22..7551bf5 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestTimelineMetricStore.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TestTimelineMetricStore.java
@@ -38,8 +38,7 @@ public class TestTimelineMetricStore implements TimelineMetricStore {
   @Override
   public TimelineMetrics getTimelineMetrics(List<String> metricNames,
       List<String> hostnames, String applicationId, String instanceId, Long startTime,
-      Long endTime, Precision precision, Integer limit, boolean groupedByHost,
-      TopNConfig topNConfig, String seriesAggregateFunction) throws SQLException,
+      Long endTime, Precision precision, Integer limit, boolean groupedByHost, TopNConfig topNConfig) throws SQLException,
     IOException {
     TimelineMetrics timelineMetrics = new TimelineMetrics();
     List<TimelineMetric> metricList = new ArrayList<TimelineMetric>();

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ba8ab6f/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStoreWatcherTest.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStoreWatcherTest.java b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStoreWatcherTest.java
index 54b8442..a94f4c5 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStoreWatcherTest.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/test/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricStoreWatcherTest.java
@@ -32,7 +32,6 @@ import org.powermock.modules.junit4.PowerMockRunner;
 import java.util.List;
 
 import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.anyString;
 import static org.easymock.EasyMock.createNiceMock;
 import static org.easymock.EasyMock.eq;
 import static org.easymock.EasyMock.expect;
@@ -58,7 +57,7 @@ public class TimelineMetricStoreWatcherTest {
     expect(metricStore.getTimelineMetrics(EasyMock.<List<String>>anyObject(),
       EasyMock.<List<String>>anyObject(), anyObject(String.class),
       anyObject(String.class), anyObject(Long.class), anyObject(Long.class),
-      eq(Precision.SECONDS), eq(1), eq(true), anyObject(TopNConfig.class), anyString()))
+      eq(Precision.SECONDS), eq(1), eq(true), anyObject(TopNConfig.class)))
       .andReturn(null).anyTimes();
 
     mockStatic(ExitUtil.class);
@@ -85,7 +84,7 @@ public class TimelineMetricStoreWatcherTest {
     expect(metricStore.getTimelineMetrics(EasyMock.<List<String>>anyObject(),
       EasyMock.<List<String>>anyObject(), anyObject(String.class),
       anyObject(String.class), anyObject(Long.class), anyObject(Long.class),
-      eq(Precision.SECONDS), eq(1), eq(true), anyObject(TopNConfig.class), anyString()))
+      eq(Precision.SECONDS), eq(1), eq(true), anyObject(TopNConfig.class)))
       .andReturn(null).anyTimes();
 
     String msg = "Error getting metrics from TimelineMetricStore. " +