ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rle...@apache.org
Subject [10/13] ambari git commit: AMBARI-21249 : Empty precision query parameter throws an error while fetching metrics from AMS.
Date Wed, 21 Jun 2017 18:06:06 GMT
AMBARI-21249 : Empty precision query parameter throws an error while fetching metrics from
AMS.


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

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 7a050b0521db706d2e5622a611718c283c5331fc
Parents: 3105859
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Tue Jun 20 17:16:57 2017 -0700
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Tue Jun 20 17:16:57 2017 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/metrics2/sink/timeline/Precision.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7a050b05/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/Precision.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/Precision.java
b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/Precision.java
index 31044cc..e87f06e 100644
--- a/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/Precision.java
+++ b/ambari-metrics/ambari-metrics-common/src/main/java/org/apache/hadoop/metrics2/sink/timeline/Precision.java
@@ -35,7 +35,7 @@ public enum Precision {
   }
 
   public static Precision getPrecision(String precision) throws PrecisionFormatException
{
-    if (precision == null ) {
+    if (precision == null || precision.isEmpty()) {
       return null;
     }
     try {


Mime
View raw message