您的位置:首页 > 编程语言 > Java开发

wordCount的认识(java版)

2015-12-09 20:02 543 查看
map

public class MyMapper extends Mapper<LongWritable, Text, Text, LongWritable> {

@Override
protected void map(LongWritable inKey, Text inValue, Context context)
throws IOException, InterruptedException {

//逻辑实现

}

}


reduce

public class MyReducer extends Reducer<Text, LongWritable,Text, LongWritable>{

@Override
protected void reduce(Text inKey, LongWritable inValue,Context context)
throws IOException, InterruptedException {

//逻辑实现

}
}


runner

public static void main(String[] args) throws Exception {

Job job = Job.getInstance();
job.setJarByClass(Driver.class);
job.set...

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: