我正在运行减速器数量设置为默认(减速器)的减速器作业。从理论上讲,输出必须每减速一个文件,但是当我跑我的工作,我有两个文件将减速器设置为默认值,但最后我有两个文件
部分-R-00000
和
部分-R-00001
为什么这是否发生?
群集中只有一个节点。
我Driver类:
public class DriverDate extends Configured implements Tool { @Override public int run(String[] args) throws Exception { if (args.length != 2) { System.out.printf("Usage: AvgWordLength inputDir outputDir\n"); System.exit(-1); } Job job = new Job(getConf()); job.setJobName("Job transformacio dates"); job.setJarByClass(DriverDate.class); job.setMapperClass(MapDate.class); job.setReducerClass(ReduceDate.class); job.setMapOutputKeyClass(Text.class); job.setMapOutputValueClass(NullWritable.class); job.setOutputKeyClass(Text.class); job.setOutputValueClass(NullWritable.class); FileInputFormat.setInputPaths(job, new Path(args[0])); FileOutputFormat.setOutputPath(job, new Path(args[1])); job.waitForCompletion(true); return 0; } public static void main(String[] args) throws Exception{ Configuration conf = new Configuration(); ToolRunner.run(conf,new DriverDate(), args); } }
你可以发表你的主要方法(或驱动程序类),以及所执行的运行程序的命令? – vefthym
没有其他额外的配置,我敢肯定,我运行的jar是正确的。 –
然后,我没有答案...只是等待别人..对不起,祝你好运! – vefthym