本文整理汇总了Java中org.apache.hadoop.mapred.UtilsForTests.RandomInputFormat类的典型用法代码示例。如果您正苦于以下问题:Java RandomInputFormat类的具体用法?Java RandomInputFormat怎么用?Java RandomInputFormat使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RandomInputFormat类属于org.apache.hadoop.mapred.UtilsForTests包,在下文中一共展示了RandomInputFormat类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configure
import org.apache.hadoop.mapred.UtilsForTests.RandomInputFormat; //导入依赖的package包/类
public void configure(JobConf conf) throws IOException {
conf.setJobName("TestCollect");
conf.setJarByClass(TestCollect.class);
conf.setInputFormat(RandomInputFormat.class); // for self data generation
conf.setOutputKeyClass(IntWritable.class);
conf.setOutputValueClass(IntWritable.class);
FileOutputFormat.setOutputPath(conf, OUTPUT_DIR);
conf.set(MRConfig.FRAMEWORK_NAME, MRConfig.LOCAL_FRAMEWORK_NAME);
conf.setMapperClass(Map.class);
conf.setReducerClass(Reduce.class);
conf.setNumMapTasks(1);
conf.setNumReduceTasks(1);
}
示例2: configure
import org.apache.hadoop.mapred.UtilsForTests.RandomInputFormat; //导入依赖的package包/类
public void configure(JobConf conf) throws IOException {
conf.setJobName("TestCollect");
conf.setJarByClass(TestCollect.class);
conf.setInputFormat(RandomInputFormat.class); // for self data generation
conf.setOutputKeyClass(IntWritable.class);
conf.setOutputValueClass(IntWritable.class);
FileOutputFormat.setOutputPath(conf, OUTPUT_DIR);
conf.setMapperClass(Map.class);
conf.setReducerClass(Reduce.class);
conf.setNumMapTasks(1);
conf.setNumReduceTasks(1);
}