问题描述
解决方案
你确认你的两个参数的类型和函数定义的能匹配么?检查你的代码。
解决方案二:
你的上一行就错了,贴完整的代码看看
解决方案三:
```public class ReduceSideJoin {
public static void main(String[] args) {
Configuration conf = new Configuration();
String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs();
if (otherArgs.length != 2) {
System.err.println("Usage: wordcount <in> <out>");
System.exit(2);
}
Job job = new Job(conf, "ReduceSideJoin");
job.setJarByClass(ReduceSideJoin.class);
job.setMapperClass(MyMapper.class);
//job.setCombinerClass(MyReducer.class);
job.setReducerClass(MyReduce.class);
job.setOutputKeyClass(IntWritable.class);
job.setOutputValueClass(Person.class);
FileInputFormat.addInputPath(job, new Path(otherArgs[0]));
FileOutputFormat.setOutputPath(job, new Path(otherArgs[1]));
System.exit(job.waitForCompletion(true) ? 0 : 1);
}
}
自定义的ReduceSideJoin
时间: 2025-01-24 23:49:13