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 4F28E200BC8 for ; Wed, 23 Nov 2016 13:04:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4DD1D160AFA; Wed, 23 Nov 2016 12:04:00 +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 BE41E160AFD for ; Wed, 23 Nov 2016 13:03:59 +0100 (CET) Received: (qmail 81049 invoked by uid 500); 23 Nov 2016 12:03:58 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 80966 invoked by uid 99); 23 Nov 2016 12:03:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2016 12:03:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5FED22C03DD for ; Wed, 23 Nov 2016 12:03:58 +0000 (UTC) Date: Wed, 23 Nov 2016 12:03:58 +0000 (UTC) From: "Steve Loughran (JIRA)" To: common-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HADOOP-13829) S3A getContentSummary to use flat listFiles instead of treewalk MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 23 Nov 2016 12:04:00 -0000 Steve Loughran created HADOOP-13829: --------------------------------------- Summary: S3A getContentSummary to use flat listFiles instead of treewalk Key: HADOOP-13829 URL: https://issues.apache.org/jira/browse/HADOOP-13829 Project: Hadoop Common Issue Type: Sub-task Components: fs/s3 Affects Versions: 2.8.0 Reporter: Steve Loughran Priority: Minor FS shell {{-count}} uses {{getContentSummary}} to summarise the contents; this slows significantly with directory tree depth. On wide directories, as the FileStatus[] array is built up before recursing down, if there are many millions of files, memory use becomes an issue Moving to a flat listFiles listing with iterator-based scanning would allow directory depth to become a near-non-issue, avoid memory problems. We'd need to reverse-construct the directory tree for its count summary; some hash map of parent paths could build that up while iterating through the files and adding up their sizes -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: common-dev-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-dev-help@hadoop.apache.org