私はEclipseを使ってmapreduceプログラムを書いています。Hadoop ライブラリ (hadoop-0.13.0-core.jar) をインポートしました
Mapper class import org.apache.hadoop.mapred.Mapper; をインポートしました。これにはエラーはありませんが、私がこのプログラムを書いたときのソースは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);
}
}
}
それは私にエラーを与えます The type Mapper is not generic; 引数でパラメータ化することはできません