title: MapReduceBase and Mapper deprecated
body: <pre><code>public static class Map extends MapReduceBase implements Mapper
  </code></pre>
  
  <p><code>MapReduceBase</code>, <code>Mapper</code> and <code>JobConf</code> are deprecated in <em>Hadoop 0.20.203</em>.</p>
  
  <p>What should we use now?</p>
  
  <p>Edit 1 - for the <code>Mapper</code> and the <code>MapReduceBase</code>, I found that we just need to extends the <code>Mapper</code></p>
  
  <pre><code>public static class Map extends Mapper
              &lt;LongWritable, Text, Text, IntWritable&gt; {
    private final static IntWritable one = new IntWritable(1);
    private Text word = new Text();
  
    public void map(LongWritable key, Text value, 
           OutputCollector&lt;Text, IntWritable&gt; output, 
           Reporter reporter) throws IOException {
      String line = value.toString();
      StringTokenizer tokenizer = new StringTokenizer(line);
      while (tokenizer.hasMoreTokens()) {
        word.set(tokenizer.nextToken());
        output.collect(word, one);
      }
    }
  }
  </code></pre>
  
  <p>Edit 2 - For <code>JobConf</code> we should use configuration like this:</p>
  
  <pre><code>public static void main(String[] args) throws Exception {
          Configuration conf = new Configuration();
          Job job = new Job(conf);
          job.setMapperClass(WordCount.Map.class);
      }
  </code></pre>
  
  <p>Edit 3 - I found a good tutorial according to the new API : <a href="http://sonerbalkir.blogspot.com/2010/01/new-hadoop-api-020x.html" rel="noreferrer">http://sonerbalkir.blogspot.com/2010/01/new-hadoop-api-020x.html</a></p>