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 238C311EC3 for ; Thu, 26 Jun 2014 19:03:03 +0000 (UTC) Received: (qmail 79008 invoked by uid 500); 26 Jun 2014 19:03:03 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 78981 invoked by uid 500); 26 Jun 2014 19:03:03 -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 78965 invoked by uid 99); 26 Jun 2014 19:03:02 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2014 19:03:02 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 1E94B1DB386; Thu, 26 Jun 2014 19:02:52 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3139096430878817385==" MIME-Version: 1.0 Subject: Re: Review Request 22941: API call to /hosts to get information about 10 hosts takes more than 30 seconds on 2K-node cluster From: "Tom Beerbower" To: "Sid Wagle" , "Tom Beerbower" Cc: "Dmytro Sen" , "Ambari" Date: Thu, 26 Jun 2014 19:02:52 -0000 Message-ID: <20140626190252.22595.52691@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Tom Beerbower" X-ReviewGroup: Ambari X-ReviewRequest-URL: https://reviews.apache.org/r/22941/ X-Sender: "Tom Beerbower" References: <20140626150423.22595.79298@reviews.apache.org> In-Reply-To: <20140626150423.22595.79298@reviews.apache.org> Reply-To: "Tom Beerbower" X-ReviewRequest-Repository: ambari --===============3139096430878817385== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > On June 26, 2014, 3:04 p.m., Tom Beerbower wrote: > > ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java, lines 74-82 > > > > > > So I think that you are keeping queryResults and populatedQueryResults so that you can get the itemCount from queryResults. Is that right? > > > > If so, could we instead make itemCount a member and record its value before we resize the resource set in queryForResources()? (I think that Sid did this in a earlier patch.) > > > > Then we only need queryResults. > > > > Dmytro Sen wrote: > itemCount can be changed several times if there is several predicates. for resource + sub-resource > > It's much easier to calculate it by getPage() after all predicates Any thoughts on this? I still see populatedQueryResults in the latest patch. - Tom ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/22941/#review46745 ----------------------------------------------------------- On June 26, 2014, 6:52 p.m., Dmytro Sen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/22941/ > ----------------------------------------------------------- > > (Updated June 26, 2014, 6:52 p.m.) > > > Review request for Ambari, Sid Wagle and Tom Beerbower. > > > Bugs: AMBARI-6263 > https://issues.apache.org/jira/browse/AMBARI-6263 > > > Repository: ambari > > > Description > ------- > > On a large cluster, calls to /hosts are taking more than 30 seconds. > This severely impacts the responsiveness of the UI for the Hosts page (it takes > 30 seconds to filter, navigate through paged hosts, etc). > The times shown are latency only (does not include download time). > > > Diffs > ----- > > ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java 63426cb > ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseRequest.java b7893c5 > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java 711e64e > ambari-server/src/main/java/org/apache/ambari/server/controller/spi/ClusterController.java 5e3f844 > ambari-server/src/main/java/org/apache/ambari/server/utils/JaxbMapKeyListAdapter.java 4589948 > ambari-server/src/main/java/org/apache/ambari/server/utils/JaxbMapKeyMapAdapter.java 8419d73 > ambari-server/src/main/java/org/apache/ambari/server/utils/JaxbMapKeyValAdapter.java e3531cd > > Diff: https://reviews.apache.org/r/22941/diff/ > > > Testing > ------- > > [INFO] Reactor Summary: > [INFO] > [INFO] Ambari Main ....................................... SUCCESS [1.632s] > [INFO] Apache Ambari Project POM ......................... SUCCESS [0.303s] > [INFO] Ambari Web ........................................ SUCCESS [22.921s] > [INFO] Ambari Views ...................................... SUCCESS [1.546s] > [INFO] Ambari Server ..................................... SUCCESS [14:21.956s] > [INFO] Ambari Agent ...................................... SUCCESS [6.150s] > [INFO] Ambari Client ..................................... SUCCESS [0.035s] > [INFO] Ambari Python Client .............................. SUCCESS [0.291s] > [INFO] Ambari Groovy Client .............................. SUCCESS [8.195s] > [INFO] Ambari Shell ...................................... SUCCESS [4.434s] > > > Thanks, > > Dmytro Sen > > --===============3139096430878817385==--