Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) throws Exception {
- Configuration conf = new Configuration();
- conf.set("fs.defaultFS", "hdfs://localhost:9000");
- Job job = Job.getInstance(conf, "word count");
- job.setJarByClass(VisitorPathCount.class);
- job.setMapperClass(TokenizerMapper.class);
- job.setCombinerClass(IntSumReducer.class);
- job.setReducerClass(IntSumReducer.class);
- job.setOutputKeyClass(Text.class);
- job.setOutputValueClass(IntWritable.class);
- FileInputFormat.addInputPath(job, new Path("/s3logs"));
- FileOutputFormat.setOutputPath(job, new Path("/tmp/result.txt"));
- System.exit(job.waitForCompletion(true) ? 0 : 1);
- }
Add Comment
Please, Sign In to add comment