package com.averscore;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.GenericOptionsParser;
public class Entry {
@SuppressWarnings("deprecation")
public static void main(String arg[]) throws Exception {
Configuration conf = new Configuration();
String[] otherarg = new GenericOptionsParser(conf, arg).getRemainingArgs();
if (otherarg.length != 2) {
System.out.println("error!");
System.exit(2);
}
Job job = new Job(conf, "averscore");
job.setJarByClass(Entry.class);
job.setMapperClass(ScoreMapper.class);
job.setReducerClass(ScoreReducer.class);
job.setOutputKeyClass(Text.class);
job.setOut
HadoopMapReduce求平均成绩
最新推荐文章于 2023-04-06 20:23:01 发布