public void configure(JobConf conf) throws IOException { conf.setJobName("TestCollect"); conf.setJarByClass(TestCollect.class); conf.setInputFormat(RandomInputFormat.class); // for self data generation conf.setOutputKeyClass(IntWritable.class); conf.setOutputValueClass(IntWritable.class); FileOutputFormat.setOutputPath(conf, OUTPUT_DIR); conf.set(MRConfig.FRAMEWORK_NAME, MRConfig.LOCAL_FRAMEWORK_NAME); conf.setMapperClass(Map.class); conf.setReducerClass(Reduce.class); conf.setNumMapTasks(1); conf.setNumReduceTasks(1); }
public void configure(JobConf conf) throws IOException { conf.setJobName("TestCollect"); conf.setJarByClass(TestCollect.class); conf.setInputFormat(RandomInputFormat.class); // for self data generation conf.setOutputKeyClass(IntWritable.class); conf.setOutputValueClass(IntWritable.class); FileOutputFormat.setOutputPath(conf, OUTPUT_DIR); conf.setMapperClass(Map.class); conf.setReducerClass(Reduce.class); conf.setNumMapTasks(1); conf.setNumReduceTasks(1); }