Streaming uses the old API (org.apache.hadoop.mapred
) - yet your mapper and reducer classes extend the new API classes (org.apache.hadoop.mapreduce
).
Try changing your mapper to implement org.apache.hadoop.mapred.Mapper
, and reducer to implement org.apache.hadoop.mapred.Reducer
, for example:
package courseproj.example;
// Mapper: emits ("article", 1) for every article occurrence.
public class WikiReader_Mapper implements Mapper<Text, Text, Text, IntWritable> {
// Reuse objects to save overhead of object creation.
private final static Text KEY = new Text();
private final static IntWritable VALUE = new IntWritable(1);
@Override
public void map(Text key, Text value, OutputCollector<Text, IntWritable> collector, Reporter reporter)
throws IOException, InterruptedException {
KEY.set("article count");
collector.collect(KEY, VALUE);
}
}