当前位置:网站首页>漫画:什么是MapReduce?
漫画:什么是MapReduce?
2022-07-05 15:35:00 【小灰】
————— 第二天 —————
————————————
什么是MapReduce?
MapReduce是一种编程模型,其理论来自Google公司发表的三篇论文(MapReduce,BigTable,GFS)之一,主要应用于海量数据的并行计算。
MapReduce可以分成Map和Reduce两部分理解。
1.Map:映射过程,把一组数据按照某种Map函数映射成新的数据。
2.Reduce:归约过程,把若干组映射结果进行汇总并输出。
让我们来看一个实际应用的栗子,如何高效地统计出全国所有姓氏的人数?
我们可以利用MapReduce的思想,针对每个省的人口做并行映射,统计出若干个局部结果,再把这些局部结果进行整理和汇总:
这张图是什么意思呢?我们来分别解释一下步骤:
1.Map:
以各个省为单位,多个线程并行读取不同省的人口数据,每一条记录生成一个Key-Value键值对。图中仅仅是简化了的数据。
2.Shuffle
Shuffle这个概念在前文并未提及,它的中文意思是“洗牌”。Shuffle的过程是对数据映射的排序、分组、拷贝。
3.Reduce
执行之前分组的结果,并进行汇总和输出。
需要注意的是,这里描述的Shuffle只是抽象的概念,在实际执行过程中Shuffle被分成了两部分,一部分在Map任务中完成,一部分在Reduce任务中完成。
Hadoop如何实现MapReduce?
Hadoop是Apache基金会开发的一套分布式系统框架,包含多个组件,其核心就是HDFS和MapReduce。
由于篇幅原因,文本不会对Hadoop做完整的介绍,只是简单介绍一下Haddoop框架当中如何实现MapReduce。
下面这张图是Hadoop框架执行一个MapReduce Job的全过程:
这里需要对几种实体进行解释:
HDFS:
Hadoop的分布式文件系统,为MapReduce提供数据源和Job信息存储。
Client Node:
执行MapReduce程序的进程,用来提交MapReduce Job。
JobTracker Node:
把完整的Job拆分成若干Task,负责调度协调所有Task,相当于Master的角色。
TaskTracker Node:
负责执行由JobTracker指派的Task,相当于Worker的角色。这其中的Task分为MapTask和ReduceTask。
最后,祝愿有志向成为大数据工程师的小伙伴们,以及小灰的所有读者们,在新的一年顺利达成梦想!
—————END—————
边栏推荐
- Intelligent metal detector based on openharmony
- RepLKNet:不是大卷积不好,而是卷积不够大,31x31卷积了解一下 | CVPR 2022
- 超分辨率技术在实时音视频领域的研究与实践
- Research and practice of super-resolution technology in the field of real-time audio and video
- Memo 00
- vant tabbar遮挡内容的解决方式
- How to introduce devsecops into enterprises?
- Advanced level of static and extern
- 企业级备份软件Veritas NetBackup(NBU) 8.1.1服务端的安装部署
- Arduino controls a tiny hexapod 3D printing robot
猜你喜欢

Data communication foundation - routing communication between VLANs

抽象类和接口的区别

Codasip adds verify safe startup function to risc-v processor series

力扣今日题-729. 我的日程安排表 I
![19.[STM32]HC_SR04超声波测距_定时器方式(OLED显示)](/img/fe/8f59db28823290da8e9280df06673d.jpg)
19.[STM32]HC_SR04超声波测距_定时器方式(OLED显示)
![[Netease Yunxin] research and practice of super-resolution technology in the field of real-time audio and video](/img/69/3aedcdafb2b4e83087dc1ce593dc38.png)
[Netease Yunxin] research and practice of super-resolution technology in the field of real-time audio and video

写单元测试的时候犯的错

Appium automation test foundation - appium basic operation API (I)

The visual experience has been comprehensively upgraded, and Howell group and Intel Evo 3.0 have jointly accelerated the reform of the PC industry

Replknet: it's not that large convolution is bad, but that convolution is not large enough. 31x31 convolution. Let's have a look at | CVPR 2022
随机推荐
Defining strict standards, Intel Evo 3.0 is accelerating the upgrading of the PC industry
Basic JSON operations of MySQL 5.7
F. Weights assignment for tree edges problem solving Report
抽象类和接口的区别
Modify PyUnit_ Time makes it support the time text of 'xx~xx months'
效果编辑器新版上线!3D渲染、加标注、设置动画,这次一个编辑器就够了
Value series solution report
Data communication foundation - Ethernet port mirroring and link aggregation
Write a go program with vscode in one article
Arduino controls a tiny hexapod 3D printing robot
Temporary cramming before DFS examination
Parameter type setting error during batch update in project SQL
Noi / 1.5 06: element maximum span value of integer sequence
Five common negotiation strategies of consulting companies and how to safeguard their own interests
异常com.alibaba.fastjson.JSONException: not match : - =
【 note 】 résoudre l'erreur de code IDE golang
Information collection of penetration test
vlunhub- BoredHackerBlog Moriarty Corp
2.3 learning content
事务回滚异常