天天看點

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,如需轉載請自行聯系原作者