title: Hadoop WordCount code, the following errors are shown
body: <p>I was reading and implementing this tutorial. At the last, I implement the three classes- Mapper, Reducer and driver. I copied the exact code given on the webpage for all three classes. But following two errors didn't go away:-</p>
  
  <p><strong>Mapper Class</strong></p>
  
  <pre><code>import java.io.IOException;
  import java.util.StringTokenizer;
  
  import org.apache.hadoop.io.IntWritable;
  import org.apache.hadoop.io.LongWritable;
  import org.apache.hadoop.io.Text;
  import org.apache.hadoop.io.Writable;
  import org.apache.hadoop.io.WritableComparable;
  import org.apache.hadoop.mapred.MapReduceBase;
  import org.apache.hadoop.mapred.Mapper;
  import org.apache.hadoop.mapred.OutputCollector;
  import org.apache.hadoop.mapred.Reporter;
  
  public class WordCountMapper extends MapReduceBase    // Here WordCountMapper was underlined as error source by Eclipse
  implements Mapper&lt;LongWritable, Text, Text, IntWritable&gt; {
  
    private final IntWritable one = new IntWritable(1);
    private Text word = new Text();
  
    public void map(WritableComparable key, Writable value,
    OutputCollector output, Reporter reporter) throws IOException {
  
      String line = value.toString();
      StringTokenizer itr = new StringTokenizer(line.toLowerCase());
      while(itr.hasMoreTokens()) {
        word.set(itr.nextToken());
        output.collect(word, one);
      }
    }
  }
  </code></pre>
  
  <p>The error was:</p>
  
  <blockquote>
    <p>The type WordCountMapper must implement the inherited abstract method 
     Mapper.map(LongWritable, Text, 
     OutputCollector, Reporter)</p>
  </blockquote>
  
  <p><strong>Driver Class (WordCount.java)</strong></p>
  
  <pre><code>import org.apache.hadoop.fs.Path;
  import org.apache.hadoop.io.IntWritable;
  import org.apache.hadoop.io.Text;
  import org.apache.hadoop.mapred.FileInputFormat;
  import org.apache.hadoop.mapred.FileOutputFormat;
  import org.apache.hadoop.mapred.JobClient;
  import org.apache.hadoop.mapred.JobConf;
  
  public class WordCount {
  
  public static void main(String[] args) {
  JobClient client = new JobClient();
  JobConf conf = new JobConf(WordCount.class);
  
  // specify output types
  conf.setOutputKeyClass(Text.class);
  conf.setOutputValueClass(IntWritable.class);
  
  // specify input and output dirs
    FileInputPath.addInputPath(conf, new Path("input"));       //////////FileInputPath was underlined
    FileOutputPath.addOutputPath(conf, new Path("output")); ////////FileOutputPath as underlined
  
  // specify a mapper
  conf.setMapperClass(WordCountMapper.class);
  
  // specify a reducer
  conf.setReducerClass(WordCountReducer.class);
  conf.setCombinerClass(WordCountReducer.class);
  
  client.setConf(conf);
  try {
    JobClient.runJob(conf);
    } catch (Exception e) {
    e.printStackTrace();
       }
   }
   }
  </code></pre>
  
  <p>The error was:</p>
  
  <ol>
  <li>FileInputPath cannot be resolved</li>
  <li>FileOutputPath cannot be resolved</li>
  </ol>