You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by av...@apache.org on 2016/12/29 20:55:26 UTC
ambari git commit: AMBARI-19320 : Additional query support for HDFS
TopN metrics. (avijayan)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 95ac5be31 -> 86b86d458
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/86b86d45
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/86b86d45
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/86b86d45
Branch: refs/heads/branch-2.5
Commit: 86b86d4587e05d8f9c80f1b761f4581ea712bbda
Parents: 95ac5be
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Thu Dec 29 12:46:19 2016 -0800
Committer: Aravindan Vijayan <av...@hortonworks.com>
Committed: Thu Dec 29 12:46:19 2016 -0800
----------------------------------------------------------------------
.../metrics/timeline/PhoenixHBaseAccessor.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/86b86d45/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 b4b8c28..250383f 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
@@ -1135,7 +1135,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);
}