Created
August 16, 2011 20:28
-
-
Save also/1150089 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val job = new Job(getConf()) | |
job.getConfiguration().setInt("mapred.map.tasks", 1) | |
job.setJarByClass(classOf[LogStats]) | |
job.setJobName("logstats") | |
job.setMapperClass(classOf[LocMap]) | |
job.setReducerClass(classOf[CountReduce]) | |
job.setMapOutputKeyClass(classOf[TextTriple]) | |
job.setMapOutputValueClass(classOf[LongWritable]) | |
job.setOutputKeyClass(classOf[TextTriple]) | |
job.setOutputValueClass(classOf[LongWritable]) | |
FileInputFormat.setInputPaths(job, new Path(inputPath)) | |
FileOutputFormat.setOutputPath(job, new Path(outputPath)) | |
val success = job.waitForCompletion(true) | |
return if (success) 0 else 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment