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 9ADB2183AB for ; Thu, 14 Jan 2016 20:45:42 +0000 (UTC) Received: (qmail 47923 invoked by uid 500); 14 Jan 2016 20:45:42 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 47895 invoked by uid 500); 14 Jan 2016 20:45:42 -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 47880 invoked by uid 99); 14 Jan 2016 20:45:42 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jan 2016 20:45:42 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 629A128119A; Thu, 14 Jan 2016 20:45:41 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4195611496776262952==" MIME-Version: 1.0 Subject: Re: Review Request 42296: HistoryServer upgrade times out when /app-logs is too large From: "Andrew Onischuk" To: "Myroslav Papirkovskyy" Cc: "Andrew Onischuk" , "Jayush Luniya" , "Ambari" Date: Thu, 14 Jan 2016 20:45:41 -0000 Message-ID: <20160114204541.26793.64294@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Andrew Onischuk" X-ReviewGroup: Ambari X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/42296/ X-Sender: "Andrew Onischuk" References: <20160114202748.26792.44418@reviews.apache.org> In-Reply-To: <20160114202748.26792.44418@reviews.apache.org> Reply-To: "Andrew Onischuk" X-ReviewRequest-Repository: ambari --===============4195611496776262952== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Jan. 14, 2016, 8:27 p.m., Jayush Luniya wrote: > > ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py, line 374 > > > > > > _fill_directories_list is already making multiple WebHDFS LISTSTATUS calls. We are recursively collecting list of directories in the path which itself is slow. > > > > We should use GETCONTENTSUMMARY to get the count of sub-directories in a directory > > > > curl -sS -L -X GET 'http://jay-2.c.pramod-thangali.internal:50070/webhdfs/v1/app-logs?op=GETCONTENTSUMMARY&user.name=hdfs' > > {"ContentSummary":{"directoryCount":18,"fileCount":15,"length":144288,"quota":-1,"spaceConsumed":432864,"spaceQuota":-1}} so what if we know how many sub directories is there. The bottleneck is files count most often. Also I don't think this is a good idea since it will add up more extra call, to slow down normal scenarios (which we have executed a lot of times in different places) - Andrew ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42296/#review114559 ----------------------------------------------------------- On Jan. 14, 2016, 10:33 a.m., Andrew Onischuk wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42296/ > ----------------------------------------------------------- > > (Updated Jan. 14, 2016, 10:33 a.m.) > > > Review request for Ambari and Myroslav Papirkovskyy. > > > Bugs: AMBARI-14660 > https://issues.apache.org/jira/browse/AMBARI-14660 > > > Repository: ambari > > > Description > ------- > > **Issue: Upgrading History Server timed out** > > * On investigation, it was noticed that we do some curl operations over WebHDFS on /app-logs HDFS folder. > * Since the /app-logs folder was too large the script was taking too long (>1200 secs). > * Retry of the upgrade step succeeded. > > > Diffs > ----- > > ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py 59a04ece > > Diff: https://reviews.apache.org/r/42296/diff/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Andrew Onischuk > > --===============4195611496776262952==--