I am using eclipse to write mapreduce program. I imported hadoop library (hadoop-0.13.0-core.jar)
I imported Mapper class import org.apache.hadoop.mapred.Mapper; there is no error in this but when I wrote this program source of this is http://developer.yahoo.com/hadoop/tutorial/module3.html
public class WordCountMapper extends MapReduceBase
implements Mapper<LongWritable, Text, Text, IntWritable> {
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);
}
}
}
it gives me error The type Mapper is not generic; it cannot be parameterized with arguments