ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avija...@apache.org
Subject ambari git commit: AMBARI-17015 : Negative values are shown for metrics in certain Ambari widgets. (avijayan)
Date Thu, 02 Jun 2016 19:46:52 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 0a78ef4ad -> d0b0e18c0


AMBARI-17015 : Negative values are shown for metrics in certain Ambari widgets. (avijayan)


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

Branch: refs/heads/branch-2.4
Commit: d0b0e18c0e1a91114f1d04b78f7809a077692a25
Parents: 0a78ef4
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Thu Jun 2 12:40:38 2016 -0700
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Thu Jun 2 12:40:45 2016 -0700

----------------------------------------------------------------------
 .../hadoop/metrics2/sink/timeline/PostProcessingUtil.java       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d0b0e18c/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/PostProcessingUtil.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/PostProcessingUtil.java
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/PostProcessingUtil.java
index 814ea1f..fb09913 100644
--- a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/PostProcessingUtil.java
+++ b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/PostProcessingUtil.java
@@ -149,7 +149,10 @@ public class PostProcessingUtil {
           interpolatedValue = y1 + m * (requiredTs - timestamps[0]);
         }
       }
-      interpolatedValuesMap.put(requiredTs, interpolatedValue);
+
+      if (interpolatedValue != null && interpolatedValue >= 0.0) {
+        interpolatedValuesMap.put(requiredTs, interpolatedValue);
+      }
     }
     return interpolatedValuesMap;
   }


Mime
View raw message