本文整理汇总了Java中org.apache.hadoop.mapreduce.lib.aggregate.ValueAggregatorJob.createValueAggregatorJob方法的典型用法代码示例。如果您正苦于以下问题:Java ValueAggregatorJob.createValueAggregatorJob方法的具体用法?Java ValueAggregatorJob.createValueAggregatorJob怎么用?Java ValueAggregatorJob.createValueAggregatorJob使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.mapreduce.lib.aggregate.ValueAggregatorJob
的用法示例。
在下文中一共展示了ValueAggregatorJob.createValueAggregatorJob方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.apache.hadoop.mapreduce.lib.aggregate.ValueAggregatorJob; //导入方法依赖的package包/类
/**
* 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);
}
示例2: main
import org.apache.hadoop.mapreduce.lib.aggregate.ValueAggregatorJob; //导入方法依赖的package包/类
/**
* 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);
}
示例3: main
import org.apache.hadoop.mapreduce.lib.aggregate.ValueAggregatorJob; //导入方法依赖的package包/类
/**
* 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);
}
示例4: main
import org.apache.hadoop.mapreduce.lib.aggregate.ValueAggregatorJob; //导入方法依赖的package包/类
/**
* 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);
}