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-19320 : Additional query support for HDFS TopN metrics. (avijayan)
Date Thu, 29 Dec 2016 21:24:00 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 82d15b57f -> 96f7f5f6f


AMBARI-19320 : Additional query support for HDFS TopN metrics. (avijayan)


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

Branch: refs/heads/trunk
Commit: 96f7f5f6ff75019a7f4a51a79cef6e087c99026a
Parents: 82d15b5
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Thu Dec 29 13:23:45 2016 -0800
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Thu Dec 29 13:23:45 2016 -0800

----------------------------------------------------------------------
 .../metrics/timeline/PhoenixHBaseAccessor.java              | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/96f7f5f6/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 c1fa328..3ced17d 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
@@ -1147,7 +1147,14 @@ public class PhoenixHBaseAccessor {
     }
 
     for (String metricNameEntry : metricFunctions.keySet()) {
-      String metricRegEx = metricNameEntry.replace("%", ".*");
+
+      String metricRegEx;
+      if (metricNameEntry.contains("*")) {
+        String metricNameWithEscSeq = metricNameEntry.replace("*","\\*");
+        metricRegEx = metricNameWithEscSeq.replace("%", ".*");
+      } else {
+        metricRegEx = metricNameEntry.replace("%", ".*");
+      }
       if (metricName.matches(metricRegEx)) {
         return metricFunctions.get(metricNameEntry);
       }


Mime
View raw message