天天看点

MapReduce在Map端的Combiner和在Reduce端的Partitioner

 1.Map端的Combiner.

通过单词计数WordCountApp.java的例子,如何在Map端设置Combiner...

只附录部分代码:

MapReduce在Map端的Combiner和在Reduce端的Partitioner
MapReduce在Map端的Combiner和在Reduce端的Partitioner

2.Reduce端的Partitioner.

以流量统计TrafficCountApp.java的例子示例Reduce端设置Partitioner.

MapReduce在Map端的Combiner和在Reduce端的Partitioner
MapReduce在Map端的Combiner和在Reduce端的Partitioner

 //============附录MapReduce中Reduce使用默认的HashPartitioner进行分组的源代码==============

MapReduce在Map端的Combiner和在Reduce端的Partitioner

本文转自SummerChill博客园博客,原文链接:http://www.cnblogs.com/DreamDrive/p/5503456.html,如需转载请自行联系原作者