Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public static void main(String[] args) throws Exception {
  2. Configuration conf = new Configuration();
  3. Job job = Job.getInstance(conf, "word count");
  4. job.setJarByClass(Wordcount.class);
  5. job.setMapperClass(WordMap.class);
  6. job.setCombinerClass(WordReduce.class);
  7. job.setReducerClass(WordReduce.class);
  8. job.setOutputKeyClass(Text.class);
  9. job.setOutputValueClass(IntWritable.class);
  10. FileInputFormat.addInputPath(job, new Path(args[0]));
  11. FileOutputFormat.setOutputPath(job, new Path(args[1]));
  12. System.exit(job.waitForCompletion(true) ? 0 : 1);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement