Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-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 31B0291B4 for ; Thu, 22 Mar 2012 07:14:20 +0000 (UTC) Received: (qmail 69260 invoked by uid 500); 22 Mar 2012 07:14:19 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 69054 invoked by uid 500); 22 Mar 2012 07:14:17 -0000 Mailing-List: contact mapreduce-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-user@hadoop.apache.org Delivered-To: mailing list mapreduce-user@hadoop.apache.org Received: (qmail 69027 invoked by uid 99); 22 Mar 2012 07:14:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2012 07:14:16 +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 (athena.apache.org: domain of thamizhannal.p@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-ob0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2012 07:14:11 +0000 Received: by obbef5 with SMTP id ef5so1770244obb.35 for ; Thu, 22 Mar 2012 00:13:50 -0700 (PDT) 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=BaLOLPyMmTI03Vhg5A+4cniBabll7h+fwBNl3ANJH0w=; b=f0sXSa4YsBNG0jEpSb+7q2Sj4UuyxNLwUGg2nfHVPnG2IkopueKFP3ZvFx0DY5YLA+ 8dpm9qiSgrWRQ8A8i8FyVuJ6G7MvRSTaYOY7q2N7shKcH6T3q6FS8hf5otfd0gWKBMDH IOUGFcPBd9ZTJKSu7xvolSND3g490GQS2BvrnhfZ//pUKpq8xb3tM1tYb0/Pe9WGH9IF HcINj9DytI3wrstMFH7pQi7zfYofPxppsKts26GxzTsN8mA+B8gxuYSay/hJs8N65zQj l+PR+Mll0kIHJFUrEypgqB+Mra90T6Hyu0fPMVYtenK2vxJYZRMwP2OsoNvAWCobQwnD q47w== MIME-Version: 1.0 Received: by 10.182.7.4 with SMTP id f4mr6124993oba.57.1332400430478; Thu, 22 Mar 2012 00:13:50 -0700 (PDT) Received: by 10.182.46.168 with HTTP; Thu, 22 Mar 2012 00:13:50 -0700 (PDT) In-Reply-To: References: Date: Thu, 22 Mar 2012 12:43:50 +0530 Message-ID: Subject: Re: HDFS Path with special char From: Thamizhannal Paramasivam To: mapreduce-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=f46d044518a15b763504bbcfa685 X-Virus-Checked: Checked by ClamAV on apache.org --f46d044518a15b763504bbcfa685 Content-Type: text/plain; charset=ISO-8859-1 Thanks a lot Harish. This is what I am looking for. On Wed, Mar 21, 2012 at 4:46 PM, Harsh J wrote: > Seems to me like you are looking for globbing your path results out. > This is possible, just pass your pattern to this API call > (FileSystem.globStatus instead of FileSystem.listStatus) and then > iterate over the returned listing: > > http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/fs/FileSystem.html#globStatus(org.apache.hadoop.fs.Path) > > On Wed, Mar 21, 2012 at 4:01 PM, Thamizhannal Paramasivam > wrote: > > Hi All, > > > > Can n't we use special character to get paths in HDFS using Hadoop API. > > > > E.g. Path path = new Path("/data/input/20120321*"); > > I have files /data/input/20120321000000/a.txt , > > /data/input/20120321010000/b.txt and /data/input/20120321020000/c.txt > under > > "/data/input/" folder. > > > > I wanted to all the files correponding to a single day. E.g. File: > > /data/input date: 20120321 > > > > How can I do that using Hadoop API. > > > > Any help would be appreciated. > > > > Thanks, > > Thamizh > > > > -- > Harsh J > --f46d044518a15b763504bbcfa685 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks a lot Harish. This is what I am looking for.


--f46d044518a15b763504bbcfa685--