MapReduce(3): Partitioner, Combiner and Shuffling
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的更多相关文章
- Hadoop基础-MapReduce的Partitioner用法案例
Hadoop基础-MapReduce的Partitioner用法案例 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.Partitioner关键代码剖析 1>.返回的分区号 ...
- MapReduce教程(二)MapReduce框架Partitioner分区<转>
1 Partitioner分区 1.1 Partitioner分区描述 在进行MapReduce计算时,有时候需要把最终的输出数据分到不同的文件中,按照手机号码段划分的话,需要把同一手机号码段的数据放 ...
- MapReduce框架Partitioner分区方法
前言:对于二次排序相信大家也是似懂非懂,我也是一样,对其中的很多方法都不理解诶,所有只有暂时放在一边,当你接触到其他的函数,你知道的越多时你对二次排序的理解也就更深入了,同时建议大家对wordcoun ...
- [MapReduce_5] MapReduce 中的 Combiner 组件应用
0. 说明 Combiner 介绍 && 在 MapReduce 中的应用 1. 介绍 Combiner: Map 端的 Reduce,有自己的使用场景 在相同 Key 过多的情况下 ...
- MapReduce 调优-Combiner
下图是演示了Combiner的好处 因为我们知道Hadoop的好处在于集群中有很多小的机器,组成了一个庞大的集群,把一个大的计算任务后者说复杂的计算过程分发到了一个个小的机器上面.但是这个集群一个致命 ...
- mapReduce的优化-combiner
mr的合成器,本质上就是reduce,在map端执行,称之为map端reduce,或者预聚合. 例子: job.setCombinerClass(WordCountCombiner.class);
- Hadoop and Big Data
Hadoop(1): HDFS Basics Hadoop(2):HDFS Block Management Hadoop(3): Prepare inputs for MapReduce mappe ...
- MR中的combiner和partitioner
1.combiner combiner是MR编程模型中的一个组件: 有些任务中map可能会产生大量的本地输出,combiner的作用就是在map端对输出先做一次合并,以减少map和reduce节点之间 ...
- 大数据技术 - MapReduce的Combiner介绍
本章来简单介绍下 Hadoop MapReduce 中的 Combiner.Combiner 是为了聚合数据而出现的,那为什么要聚合数据呢?因为我们知道 Shuffle 过程是消耗网络IO 和 磁盘I ...
随机推荐
- STM32启动地址设置及从非0x800000 开始调试程序
首先设置程序的启动地址,STM32默认的启动地址是从0x8000000开始的,现在我要设置程序向后偏移10K地址,也就是从0x8002800启动. 需要分两步完成上面操作: 一.Keil MDK设置: ...
- Dubbo一文入门
一.简介 系统的架构,已从最早的单体式架构(一个war包完事)逐渐发展到目前的微服务式架构.微服务,将一个大型的复杂的应用系统,拆分成若干独立的松耦合的小的服务工程,每个服务工程可独立部署,每个服务只 ...
- MATLAB:非线性规划fmincon
1.非线性规划的形式: 其中x是一个列向量,st中前两项为线性约束条件,后两项为非线性约束条件. 在MATLAB中fmincon是用于求解非线性多远函数的最小值的函数,这里介绍fmincon的其中一种 ...
- td内容超出 以…显示
table中的td内容超出以省略号显示,需满足的条件是: <style type="text/css"> table{ table-layout: fixed; bor ...
- 学Python的第八天
最近因为很多生活琐事+生病+培训耽误了好几天的学习,不过幸好身体feel fly!! 今天依旧是爱Python的一天-.- 前几天以及今天所列出来的Python魔法类型不需要死记硬背熬.... #!/ ...
- 安装kali linux 后出现文字乱码问题
在安装kali时我选择中文安装,结果安装完成后出现文字乱码现象 在经过上网查询后,采用了CSDN博客站中的 stubbornness1219 这位博主的解决方案成功将问题解决. 解决方案:终端下执行s ...
- [php代码审计] php四种标记
php手册中的介绍: 可以在 PHP 中使用四对不同的开始和结束标记.其中两种,<?php ?> 和 <script language="php"> < ...
- 修改编码为utf8mb4 以支持emoji表情
环境: 项目db的所有字符集都已经初始化为utf-8,如 status命令显示如下: Server characterset: utf8Db characterset: utf8Client char ...
- 多线程、同步实现方法及Error和Exception的区别与联系
多线程.同步实现方法? 实现线程有两种方法: 继承Thread类 实现Runnable接口 实现同步也有两种方法 一种是用同步方法:同步方法就是在方法返回类型后面加上synchronized, 比如: ...
- 对排序(Sort)的研究
这一篇主要是介绍一些数据排序的基本算法和高级算法并利用JavaScript来逐一实现, 算法的说明: 稳定:如果a原本在b前面,当a=b时,排序之后a仍然在b的前面 不稳定:如果a原本在b的前面,当a ...