Partitioner:

Partitioning and Combining take place between Map and Reduce phases. It is to club the data which should go to the same reducer based on keys. The number of partitioners is equal to the number of reducers. That means a partitioner will divide the data according to the number of reducers. Therefore, the data passed from a single partitioner is processed by a single Reducer. HashPartitioner is the default Partitioner in hadoop.

A partitioner partitions the key-value pairs of intermediate Map-outputs. It partitions the data using a user-defined condition, which works like a hash function. The total number of partitions is same as the number of Reducer tasks for the job. Records having the same key value go into the same partition (within each mapper).

Partition doing jobs on local machine.

Combiner:

Combiner is a 'mini-reducer' (semi-reducer), used to process reducer's work before transfering data onto reducers. It can reduce network congestion. An example is shown below:

Shuffle:

shuffle notify master to copy files onto reducer machines. In the final output of map task there can be multiple partitions and these partitions should go to different reduce task. Shuffling is basically transferring map output partitions to the corresponding reduce tasks. Map task notified application master about completion of map task and application master notifies corresponding reducer to copy the map output into reduce machine. As shuffling can start even before the map phase has finished so this saves some time and completes the tasks in lesser time.

References:

https://www.cnblogs.com/hadoop-dev/p/5910459.html

https://blog.csdn.net/bitcarmanlee/article/details/60137837

http://geekdirt.com/blog/map-reduce-in-detail/

Using hash function to map immediate K,V pairs

https://en.wikipedia.org/wiki/Hash_function

https://www.tutorialspoint.com/map_reduce/map_reduce_partitioner.htm

https://data-flair.training/blogs/hadoop-partitioner-tutorial/

MapReduce(3): Partitioner, Combiner and Shuffling的更多相关文章

  1. Hadoop基础-MapReduce的Partitioner用法案例

    Hadoop基础-MapReduce的Partitioner用法案例 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.Partitioner关键代码剖析 1>.返回的分区号 ...

  2. MapReduce教程(二)MapReduce框架Partitioner分区<转>

    1 Partitioner分区 1.1 Partitioner分区描述 在进行MapReduce计算时,有时候需要把最终的输出数据分到不同的文件中,按照手机号码段划分的话,需要把同一手机号码段的数据放 ...

  3. MapReduce框架Partitioner分区方法

    前言:对于二次排序相信大家也是似懂非懂,我也是一样,对其中的很多方法都不理解诶,所有只有暂时放在一边,当你接触到其他的函数,你知道的越多时你对二次排序的理解也就更深入了,同时建议大家对wordcoun ...

  4. [MapReduce_5] MapReduce 中的 Combiner 组件应用

    0. 说明 Combiner 介绍 &&  在 MapReduce 中的应用 1. 介绍 Combiner: Map 端的 Reduce,有自己的使用场景 在相同 Key 过多的情况下 ...

  5. MapReduce 调优-Combiner

    下图是演示了Combiner的好处 因为我们知道Hadoop的好处在于集群中有很多小的机器,组成了一个庞大的集群,把一个大的计算任务后者说复杂的计算过程分发到了一个个小的机器上面.但是这个集群一个致命 ...

  6. mapReduce的优化-combiner

    mr的合成器,本质上就是reduce,在map端执行,称之为map端reduce,或者预聚合. 例子: job.setCombinerClass(WordCountCombiner.class);

  7. Hadoop and Big Data

    Hadoop(1): HDFS Basics Hadoop(2):HDFS Block Management Hadoop(3): Prepare inputs for MapReduce mappe ...

  8. MR中的combiner和partitioner

    1.combiner combiner是MR编程模型中的一个组件: 有些任务中map可能会产生大量的本地输出,combiner的作用就是在map端对输出先做一次合并,以减少map和reduce节点之间 ...

  9. 大数据技术 - MapReduce的Combiner介绍

    本章来简单介绍下 Hadoop MapReduce 中的 Combiner.Combiner 是为了聚合数据而出现的,那为什么要聚合数据呢?因为我们知道 Shuffle 过程是消耗网络IO 和 磁盘I ...

随机推荐

  1. 25.conda 下载安装与运用

    转载:https://www.cnblogs.com/gandoufu/p/9748841.html https://blog.csdn.net/tuzixini/article/details/81 ...

  2. k3 cloud工程量清单调整后工程量为零行设置为黄色

    #引入clr运行库 import clr #添加对cloud插件开发的常用组件的引用 clr.AddReference('Kingdee.BOS') clr.AddReference('Kingdee ...

  3. k3 cloud出现应收单下推收款单,把收款单是结算方式修改成银行承兑汇票之后保存提示:收款单明细中结算方式为票据业务的实收金额之和不等于票据的当前占用金额之和,请检查数据!

    收款单结算方式选择[银行承兑汇票],系统就默认该笔业务在系统中要存在一张应收票据.则在应收票据页签,需要选择一张出纳的应收票据(要先存在应收票据,才能保存单据,相当于是根据这张票据审核生成的这张收单单 ...

  4. 1. AtomicInteger 、Unsafe 及 CAS方法的整理

    本文摘自: https://blog.csdn.net/fanrenxiang/article/details/80623884 http://ifeve.com/sun-misc-unsafe/ h ...

  5. 不想用ubuntu了,换个系统manjaro - change

    # 下载 https://mirrors.tuna.tsinghua.edu.cn/osdn/storage/g/m/ma/manjaro/xfce/ # usb启动盘 rufus # 中文字体 pa ...

  6. Taro -- 原生微信小程序转taro

    微信小程序转Taro  (转发https://nervjs.github.io/taro/docs/taroize.html) Taro 可以将你的原生微信小程序应用转换为 Taro 代码,进而你可以 ...

  7. vuex 使用实例

    官网:https://vuex.vuejs.org/zh/guide/state.html Vuex 是一个专为 Vue.js 应用程序开发的状态管理模式 1.vuex解决了组件之间同一状态的共享问题 ...

  8. python if-else替代三元表达式

    python中判断一个数是否是偶数的常规代码: def _compare(data): if data % 2 == 0: return True else: return False # 调用偶数判 ...

  9. Ansible自动化运维工具(1)

    1. Ansible的架构 Ansible的帮助文档: http://www.ansible.com.cn/index.html 2. YAML语言简介 基本规则 列表(list, [, , , .. ...

  10. idea中ehcahe配置中 Cannot find the declaration of element 'ehcache'.

    ehcahe.xml 中报错: Cannot find the declaration of element 'ehcache'. 打开settings->languages&frame ...