Guest User

Untitled

a guest
Dec 18th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. Configuration conf = new Configuration();
  2. Job job = Job.getInstance(conf, "Log Count");
  3.  
  4. job.setJarByClass(hadoop1a.Hadoop1A.class);
  5.  
  6. MultithreadedMapper.setMapperClass(job, Hadoop1A.MapperInciso1A.class);
  7. MultithreadedMapper.setNumberOfThreads(job, 2);
  8.  
  9. job.setMapperClass(MapperInciso1A.class);
  10. job.setMapOutputKeyClass(Text.class);
  11. job.setMapOutputValueClass(Text.class);
  12.  
  13. job.setReducerClass(ReducerInciso1A.class);
  14. job.setOutputKeyClass(Text.class);
  15. job.setOutputValueClass(IntWritable.class);
  16.  
  17. FileInputFormat.addInputPath(job, new Path(args[0]));
  18. FileOutputFormat.setOutputPath(job, new Path(args[1]));
  19.  
  20. System.exit(job.waitForCompletion(true) ? 0 : 1);
Add Comment
Please, Sign In to add comment