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 A6F36200C01 for ; Thu, 5 Jan 2017 00:31:13 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A5802160B44; Wed, 4 Jan 2017 23:31:13 +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 ED2F6160B3A for ; Thu, 5 Jan 2017 00:31:12 +0100 (CET) Received: (qmail 71382 invoked by uid 500); 4 Jan 2017 23:31:12 -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 71373 invoked by uid 99); 4 Jan 2017 23:31:12 -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; Wed, 04 Jan 2017 23:31:12 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 115AADF9FC; Wed, 4 Jan 2017 23:31:12 +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 (Commit 2) (avijayan) Date: Wed, 4 Jan 2017 23:31:12 +0000 (UTC) archived-at: Wed, 04 Jan 2017 23:31:13 -0000 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 Authored: Wed Jan 4 15:31:05 2017 -0800 Committer: Aravindan Vijayan 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("%", ".*");