Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2998F200BEC for ; Thu, 29 Dec 2016 22:24:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 282E7160B2D; Thu, 29 Dec 2016 21:24:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7246C160B23 for ; Thu, 29 Dec 2016 22:24:02 +0100 (CET) Received: (qmail 57975 invoked by uid 500); 29 Dec 2016 21:24:00 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 57966 invoked by uid 99); 29 Dec 2016 21:24:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2016 21:24:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 90C44DFC11; Thu, 29 Dec 2016 21:24:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: avijayan@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-19320 : Additional query support for HDFS TopN metrics. (avijayan) Date: Thu, 29 Dec 2016 21:24:00 +0000 (UTC) archived-at: Thu, 29 Dec 2016 21:24:03 -0000 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 Authored: Thu Dec 29 13:23:45 2016 -0800 Committer: Aravindan Vijayan 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); }