In migrating from the mapred.* classes to mapreduce.* classes I noticed I am 
not able to get "map.input.file" from the configuration returned from the 
Map.Context getConfiguration() method.  I didn't see an obvious answer but 
poking around I found I could get the file name as follows:

     public void setup(Context context) {
         FileSplit fileSplit = (FileSplit)context.getInputSplit();
         String input_fname = fileSplit.getPath().toString();
    }

   Which is basically what is done in mapred.MapTask.

    That seems reasonable.  I guess my question is does that seem right?  Does 
it seem like an oversight to no longer set "map.input.file" or is it suggested 
to use context.getInputSplit() and get the filename from there.

    Thanks

    Andy

Reply via email to