On 6/2/09, Rares Vernica <rvern...@gmail.com> wrote:
>
> I have a problem getting the map input file name. Here is what I tried:
>
> public class Map extends Mapper<Object, Text, LongWritable, Text> {
>
>     public void map(Object key, Text value, Context context)
>             throws IOException, InterruptedException {
>         Configuration conf = context.getConfiguration();
>         System.out.println(conf.get("map.input.file"));
>         System.out.println(conf.get("map.input.filename"));
>         System.out.println(conf.get("mapred.input.file"));
>         System.out.println(conf.get("mapred.input.filename"));
>     }
>
>     protected void setup(Context context) throws IOException,
>             InterruptedException {
>         Configuration conf = context.getConfiguration();
>         System.out.println(conf.get("map.input.file"));
>         System.out.println(conf.get("map.input.filename"));
>         System.out.println(conf.get("mapred.input.file"));
>         System.out.println(conf.get("mapred.input.filename"));
>     }
> }
>
> All the get is "null". What am I doing wrong?

I created https://issues.apache.org/jira/browse/HADOOP-5973

Reply via email to