/** * The main driver for word count map/reduce program. Invoke this method to * submit the map/reduce job. * * @throws IOException * When there is communication problems with the job tracker. */ @SuppressWarnings("unchecked") public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException { Job job = ValueAggregatorJob.createValueAggregatorJob(args , new Class[] {WordCountPlugInClass.class}); job.setJarByClass(AggregateWordCount.class); int ret = job.waitForCompletion(true) ? 0 : 1; System.exit(ret); }
/** * The main driver for word count map/reduce program. Invoke this method to * submit the map/reduce job. * * @throws IOException * When there is communication problems with the job tracker. */ @SuppressWarnings("unchecked") public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException { Job job = ValueAggregatorJob.createValueAggregatorJob(args , new Class[] {AggregateWordHistogramPlugin.class}); job.setJarByClass(AggregateWordCount.class); int ret = job.waitForCompletion(true) ? 0 : 1; System.exit(ret); }
/** * The main driver for word count map/reduce program. Invoke this method to * submit the map/reduce job. * * @throws IOException * When there is communication problems with the job tracker. */ @SuppressWarnings("unchecked") public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException { long random = new Random().nextLong(); log.info("random -> " + random); args = new String[] { String.format(ConfigUtils.HDFS.WORDCOUNT_IN, "word.txt"), String.format(ConfigUtils.HDFS.WORDCOUNT_OUT, random) }; Job job = ValueAggregatorJob.createValueAggregatorJob(args, new Class[] { WordCountPlugInClass.class }); job.setJarByClass(AggregateWordCount.class); job.setInputFormatClass(TextInputFormat.class); int ret = job.waitForCompletion(true) ? 0 : 1; System.exit(ret); }
/** * The main driver for word count map/reduce program. Invoke this method to * submit the map/reduce job. * * @throws IOException * When there is communication problems with the job tracker. */ @SuppressWarnings("unchecked") public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException { long random = new Random().nextLong(); log.info("random -> " + random); args = new String[] { String.format(ConfigUtils.HDFS.WORDCOUNT_IN, "word.txt"), String.format(ConfigUtils.HDFS.WORDCOUNT_OUT, random) }; Job job = ValueAggregatorJob.createValueAggregatorJob(args, new Class[] { AggregateWordHistogramPlugin.class }); job.setJarByClass(AggregateWordCount.class); job.setInputFormatClass(TextInputFormat.class); int ret = job.waitForCompletion(true) ? 0 : 1; System.exit(ret); }