You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2016/01/21 14:28:42 UTC
ambari git commit: AMBARI-14694 Unnecessary multiple TreeMap creation
(dsen)
Repository: ambari
Updated Branches:
refs/heads/trunk c9bb7319e -> b0aeefc87
AMBARI-14694 Unnecessary multiple TreeMap creation (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b0aeefc8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b0aeefc8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b0aeefc8
Branch: refs/heads/trunk
Commit: b0aeefc87daa7ed8040032a2998764f27bbdaa8d
Parents: c9bb731
Author: Dmytro Sen <ds...@apache.org>
Authored: Thu Jan 21 15:28:25 2016 +0200
Committer: Dmytro Sen <ds...@apache.org>
Committed: Thu Jan 21 15:28:25 2016 +0200
----------------------------------------------------------------------
.../metrics/timeline/PhoenixHBaseAccessor.java | 2 +-
.../metrics/timeline/aggregators/TimelineMetricReadHelper.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b0aeefc8/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
index c5d7b0c..8325fb1 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java
@@ -207,7 +207,7 @@ public class PhoenixHBaseAccessor {
@SuppressWarnings("unchecked")
public static TreeMap<Long, Double> readMetricFromJSON(String json) throws IOException {
- return (TreeMap<Long, Double>) mapper.readValue(json, metricValuesTypeRef);
+ return mapper.readValue(json, metricValuesTypeRef);
}
private Connection getConnectionRetryingOnException()
http://git-wip-us.apache.org/repos/asf/ambari/blob/b0aeefc8/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/aggregators/TimelineMetricReadHelper.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/aggregators/TimelineMetricReadHelper.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/aggregators/TimelineMetricReadHelper.java
index dc27614..c5e60fe 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/aggregators/TimelineMetricReadHelper.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/aggregators/TimelineMetricReadHelper.java
@@ -40,8 +40,8 @@ public class TimelineMetricReadHelper {
public TimelineMetric getTimelineMetricFromResultSet(ResultSet rs)
throws SQLException, IOException {
TimelineMetric metric = getTimelineMetricCommonsFromResultSet(rs);
- TreeMap<Long, Double> sortedByTimeMetrics = new TreeMap<Long, Double>(
- PhoenixHBaseAccessor.readMetricFromJSON(rs.getString("METRICS")));
+ TreeMap<Long, Double> sortedByTimeMetrics =
+ PhoenixHBaseAccessor.readMetricFromJSON(rs.getString("METRICS"));
metric.setMetricValues(sortedByTimeMetrics);
return metric;
}