combiner 理解 Combiner可以理解为在map端进行了一次reduce操作,将map端的输出数据作为combiner的输入数据,进行一次预聚合,减少了要发送到reduce端的数据. 图解: 适用范围 适用于求和,求最大值得操作. 不适用求平均值得操作. 自定义combiner 创建MyCombiner类,继承Reducer类,重写reduce方法 最后在主程序中添加自定义得MyCombiner类 job.setCombinerClass(MyCombiner.class);