List of usage examples for org.apache.hadoop.mapreduce.lib.aggregate ValueAggregatorJob createValueAggregatorJob
public static Job createValueAggregatorJob(String args[], Class<? extends ValueAggregatorDescriptor>[] descriptors) throws IOException
From source file:com.phantom.hadoop.examples.AggregateWordCount.java
License:Apache License
/** * The main driver for word count map/reduce program. Invoke this method to * submit the map/reduce job.// www .ja v a 2 s. c om * * @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); }
From source file:com.phantom.hadoop.examples.AggregateWordHistogram.java
License:Apache License
/** * The main driver for word count map/reduce program. Invoke this method to * submit the map/reduce job.//from w ww . j ava 2s. com * * @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); }