package com.qq.bd; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; import java.io.IOException; public class FlowCountCompare { static class FlowCountCompareMapper extends Mapper<LongWritable, Text, FlowBean, Text> { /* 因为要按sumFlow排序输出,又因map partitioner compare compare 只对key排序所以map输出key为FlowBean */ // 提前实例化,不用在context。write时在对每一个kv对都实例化了,速度快点 //
mr compare
最新推荐文章于 2021-11-17 23:06:39 发布