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 (Commit 2) (avijayan)
Date Wed, 04 Jan 2017 23:31:12 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 82a64e498 -> 7a7bc003f


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


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

Branch: refs/heads/trunk
Commit: 7a7bc003f8d9f3eb1a84b66685e9036bcc92679a
Parents: 82a64e4
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Wed Jan 4 15:31:05 2017 -0800
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Wed Jan 4 15:31:05 2017 -0800

----------------------------------------------------------------------
 .../metrics/timeline/PhoenixHBaseAccessor.java                | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7a7bc003/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 3ced17d..3add411 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
@@ -1149,8 +1149,11 @@ public class PhoenixHBaseAccessor {
     for (String metricNameEntry : metricFunctions.keySet()) {
 
       String metricRegEx;
-      if (metricNameEntry.contains("*")) {
-        String metricNameWithEscSeq = metricNameEntry.replace("*","\\*");
+      //Special case handling for metric name with * and __%.
+      //For example, dfs.NNTopUserOpCounts.windowMs=300000.op=*.user=%.count
+      // or dfs.NNTopUserOpCounts.windowMs=300000.op=__%.user=%.count
+      if (metricNameEntry.contains("*") || metricNameEntry.contains("__%")) {
+        String metricNameWithEscSeq = metricNameEntry.replace("*", "\\*").replace("__%",
"..%");
         metricRegEx = metricNameWithEscSeq.replace("%", ".*");
       } else {
         metricRegEx = metricNameEntry.replace("%", ".*");


Mime
View raw message