Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9E970105AB for ; Sat, 11 Jan 2014 23:58:20 +0000 (UTC) Received: (qmail 42857 invoked by uid 500); 11 Jan 2014 23:57:59 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 42187 invoked by uid 500); 11 Jan 2014 23:57:57 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 42180 invoked by uid 99); 11 Jan 2014 23:57:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Jan 2014 23:57:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yuzhihong@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Jan 2014 23:57:50 +0000 Received: by mail-lb0-f173.google.com with SMTP id y6so2465610lbh.18 for ; Sat, 11 Jan 2014 15:57:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=mC2CE2K8KHGCoItzcsvB7O9C1iLDfPYIrdB8Dh0LfWk=; b=DUY23u44O+N6518TkGCrV1Ru40Od2jTNr1pzyD2ir2278wZIhcZ3wBY46A3BZJ2Udv 7VZg4XX62+IoOS0m6VdnYGOebz3OENFA+DPijQWX4ak8R2rr5V/9DH4J60GnrCnKfeTY mxEg+e/7QHNq4u4aQcbJsAX1xpH6UylWBLov9i5dkbgujz+7e2xSTQMopoTjCb4UoW7H gUVyrUfnWRtiFveCQf1UP0ZfZw4u1PDRk9LwI0gMY10tkMeuFdTWP0jJABN0dld//oGz 8gZ432zHXB5yRTnbZtLH3xMVApaZyRzcQvK1roR9Y5Q/7JXss5fXKRtv7lVRnwZlC7Mz S/5A== MIME-Version: 1.0 X-Received: by 10.112.167.228 with SMTP id zr4mr633687lbb.56.1389484650046; Sat, 11 Jan 2014 15:57:30 -0800 (PST) Received: by 10.112.212.102 with HTTP; Sat, 11 Jan 2014 15:57:30 -0800 (PST) In-Reply-To: <869970D71E26D7498BDAC4E1CA92226B86E0E807@MBX021-E3-NJ-2.exch021.domain.local> References: <869970D71E26D7498BDAC4E1CA92226B86E0E807@MBX021-E3-NJ-2.exch021.domain.local> Date: Sat, 11 Jan 2014 15:57:30 -0800 Message-ID: Subject: Re: FileSystem iterative or limited alternative to listStatus() From: Ted Yu To: "common-user@hadoop.apache.org" Content-Type: multipart/alternative; boundary=001a11c2432afca79404efba9a01 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2432afca79404efba9a01 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Can you utilize the following API ? public FileStatus[] listStatus(Path f, PathFilter filter) Cheers On Sat, Jan 11, 2014 at 3:52 PM, John Lilley wrot= e: > Is there an HDFS file system method for listing a directory contents > iteratively, or at least stopping at some limit? We have an application = in > which the user can type wildcards, which our app expands. However, durin= g > interactive phases we only want the first matching file to check its > format. There may be folders with many 1000s of files=85 > > Thanks > > John > > > --001a11c2432afca79404efba9a01 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
Can you utilize the following API ?

=A0=A0public FileStatus[] listStatus(= Path f, PathFilter filter)=A0

Cheers



On Sat, Jan 11, 201= 4 at 3:52 PM, John Lilley <john.lilley@redpoint.net> = wrote:

Is there an HDFS file system method for listing a di= rectory contents iteratively, or at least stopping at some limit?=A0 We hav= e an application in which the user can type wildcards, which our app expand= s.=A0 However, during interactive phases we only want the first matching file to check its format.=A0 There may be = folders with many 1000s of files=85

Thanks

John

=A0


--001a11c2432afca79404efba9a01--