((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 <[email protected]> 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
