码迷,mamicode.com
首页 > 移动开发 > 详细

MapReduce ChainMapper/ChainReducer

时间:2017-07-06 10:16:12      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:比较   after   mapreduce   http   重复   通用   com   column   details   

The ChainMapper class allows to use multiple Mapper classes within a single Map task

The ChainReducer class allows to chain multiple Mapper classes after a Reducer within the Reducer task.

 

  没有Chain之前,只能通用多个Job迭代来实现数据递进处理,这样做的缺点是:

    a. 每次迭代,如果所有 Job 对象重复创建,代价将非常高。

    b. 每次迭代,数据的 I/O和网络传输的代价比较大;

 

MapReduce工作流三种方式:迭代;JobControl依赖;Chain链式结构;

 

--------

示例参考:http://www.iteye.com/topic/1134144 (多个mapper执行不同操作,reducer合并处理后,再对唯一字段进行处理)

       http://blog.csdn.net/genghaihua/article/details/46910865

  

 

MapReduce ChainMapper/ChainReducer

标签:比较   after   mapreduce   http   重复   通用   com   column   details   

原文地址:http://www.cnblogs.com/mzzcy/p/7124266.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!