hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <qwertyman...@gmail.com>
Subject Re: Retrieving Filename
Date Sat, 07 Aug 2010 05:53:13 GMT
((FileSplit) context.getInputSplit()).getPath() is the right way to do
it with the new API (0.20+).

On Sat, Aug 7, 2010 at 4:16 AM, Benjamin Campbell
<benji.campbell@gmail.com> wrote:
> Hey all!
>
> I am trying to retrieve the filename of the input file into my Mapper class.
> I read it's accessible from my Configuration:
>
> String filename = context.getConfiguration().
> get( "map.input.file" );
>
> But I am also intrigued by the String[] context.getInputSplit.getLocations()
> function. What other ways are available to retrieve the filename in my
> Mapper Class/function?
>
> I am using the latest 0.20.2 release.
>
>
> --
> Thanks
>
> Ben Campbell
>



-- 
Harsh J
www.harshj.com

Mime
View raw message