You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Allen Wittenauer (JIRA)" <ji...@apache.org> on 2014/07/22 22:24:40 UTC

[jira] [Resolved] (MAPREDUCE-2166) "map.input.file" is not set

     [ https://issues.apache.org/jira/browse/MAPREDUCE-2166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Allen Wittenauer resolved MAPREDUCE-2166.
-----------------------------------------

    Resolution: Not a Problem

> "map.input.file" is not set
> ---------------------------
>
>                 Key: MAPREDUCE-2166
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2166
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: task
>            Reporter: Rares Vernica
>            Priority: Minor
>
> Hadoop does not set the "map.input.file" variable. I tried the fallowing and all I get is "null".
> 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"));
>    }
>    protected void setup(Context context) throws IOException,
>            InterruptedException {
>        Configuration conf = context.getConfiguration();
>        System.out.println(conf.get("map.input.file"));
>    }
> }



--
This message was sent by Atlassian JIRA
(v6.2#6252)