hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thamizhannal Paramasivam <thamizhanna...@gmail.com>
Subject Re: HDFS Path with special char
Date Thu, 22 Mar 2012 07:13:50 GMT
Thanks a lot Harish. This is what I am looking for.

On Wed, Mar 21, 2012 at 4:46 PM, Harsh J <harsh@cloudera.com> 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
> <thamizhannal.p@gmail.com> 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
>

Mime
View raw message