ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [15/22] ambari git commit: AMBARI-14694 Unnecessary multiple TreeMap creation (dsen)
Date Thu, 21 Jan 2016 19:21:14 GMT
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/branch-dev-patch-upgrade
Commit: b0aeefc87daa7ed8040032a2998764f27bbdaa8d
Parents: c9bb731
Author: Dmytro Sen <dsen@apache.org>
Authored: Thu Jan 21 15:28:25 2016 +0200
Committer: Dmytro Sen <dsen@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;
   }


Mime
View raw message