mapreduce程序运行时设置函数job.setMapperClass出错
public class MaxTemperatureDriver extends Configured implements Tool{
@Override
public int run(String[] args) throws Exception {
// TODO Auto-generated method stub
if(args.length != 2){
System.err.printf("USAG:%s [generic option] <inpur> <output>\n" , getClass().getSimpleName());
ToolRunner.printGenericCommandUsage(System.err);
return -1;
}
Job job = new Job(new Configuration(), "Max temperature");
//JobConf jobconf = new JobConf(new Configuration());jobconf.setMapperClass(? extends DataJoinMapperBase.class).
job.setJarByClass(getClass());
FileInputFormat.addInputPath(job, new Path(args[0]));
FileOutputFormat.setOutputPath(job, new Path(args[1]));
job.setMapperClass( MaxTemperatureMapper.class);
job.setCombinerClass(MaxTemperatureReducer.class);
job.setReducerClass(MaxTemperatureReducer.class);
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(IntWritable.class);
return job.waitForCompletion(true) ? 0 : 1;
}
public static void main(String [] args) throws Exception{
int exitCode = ToolRunner.run(new MaxTemperatureDriver(),args);
System.exit(exitCode);
}
}
为什么会出现The method setMapperClass (class<?extends Mapper>) in the type Job is not applicable for the arguments (class<MaxTemperatureMapper>)