Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BF45E174F5 for ; Tue, 12 May 2015 12:48:49 +0000 (UTC) Received: (qmail 86299 invoked by uid 500); 12 May 2015 12:48:49 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 86267 invoked by uid 500); 12 May 2015 12:48:49 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 86252 invoked by uid 99); 12 May 2015 12:48:49 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 May 2015 12:48:49 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id EA1B91CC42E; Tue, 12 May 2015 12:48:49 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============8920285586655437298==" MIME-Version: 1.0 Subject: Re: Review Request 33986: Queue-specific metrics cannot be queried as time series data via Ambari API From: "Dmytro Sen" To: "Myroslav Papirkovskyy" , "Sid Wagle" , "Jonathan Hurley" Cc: "Dmytro Sen" , "Ambari" Date: Tue, 12 May 2015 12:48:49 -0000 Message-ID: <20150512124849.18931.61528@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Dmytro Sen" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/33986/ X-Sender: "Dmytro Sen" References: <20150508180222.31936.38210@reviews.apache.org> In-Reply-To: <20150508180222.31936.38210@reviews.apache.org> Reply-To: "Dmytro Sen" X-ReviewRequest-Repository: ambari --===============8920285586655437298== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit > On Май 8, 2015, 6:02 п.п., Sid Wagle wrote: > > Does this stop ambari server from requesting all queue metrics from the backend? > > What I observed (without this patch) is that besides the regex replace not working, multiple queue metrics were requested even though only /AppsCompleted was part of the API call. It's because incorrect worrking of regex relace, metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AvailableMB was replaced with metrics/yarn/Queue/$1 After this patch, for the API request below http://host:11081/api/v1/clusters/c1/services/YARN/components/RESOURCEMANAGER?fields=metrics/yarn/Queue/root/default/AppsRunning[1431092463,1431096063,15] AMSPropertyProvider sends http://host:6188/ws/v1/timeline/metrics?metricNames=yarn.QueueMetrics.Queue%3Droot.default.AppsRunning&appId=RESOURCEMANAGER&startTime=1431092463&endTime=1431096063 - Dmytro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33986/#review83032 ----------------------------------------------------------- On Май 8, 2015, 3:47 п.п., Dmytro Sen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/33986/ > ----------------------------------------------------------- > > (Updated Май 8, 2015, 3:47 п.п.) > > > Review request for Ambari, Jonathan Hurley, Myroslav Papirkovskyy, and Sid Wagle. > > > Bugs: AMBARI-11030 > https://issues.apache.org/jira/browse/AMBARI-11030 > > > Repository: ambari > > > Description > ------- > > Queue-specific metrics cannot be retrieved as time-series data via Ambari API. > /api/v1/clusters/c1/services/YARN/components/RESOURCEMANAGER?fields=metrics/yarn/Queue/root/default/AppsRunning returns the point-in-time metric properly. > However, when you query for it as time-series, in the following format the API returns nothing: > /api/v1/clusters/c1/services/YARN/components/RESOURCEMANAGER?fields=metrics/yarn/Queue/root/default/AppsRunning[start,end,interval] > The time-series query works if you replace /root/default with /root. > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseProvider.java a95342a > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BaseProviderTest.java 380142e > > Diff: https://reviews.apache.org/r/33986/diff/ > > > Testing > ------- > > Manual tests passed. > Unit tests execution is in progress > > > Thanks, > > Dmytro Sen > > --===============8920285586655437298==--