【无标题】词频统计

根据部门编号分区,根据 薪水+补贴 降序排列

public class MapReduceWC {
    public static class MapWC extends Mapper<LongWritable,Text,Text, IntWritable> {
        IntWritable num =new IntWritable(1);
        Text word = new Text();
        @Override
        protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, IntWritable>.Context context) throws IOException, InterruptedException {
            String[] split=value.toString().split("n");
            for (String s:split){
                word.set(s);
                context.write(null,num);
            }
        }
    }

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>