《Hadoop: The Definitive Guide》读书笔记 -- Chapter 2 MapReduce

本文探讨了使用Hadoop MapReduce进行大规模数据处理的方法,包括如何将工作分割为等大小的部分、数据分布式存储、任务调度、数据局部优化、结果合并以及使用Hadoop Streaming进行文本处理的基本步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Chapter 2 MapReduce


Analyzing the Data with Unix Tools

Problems

1. dividing work into equal-size isn't always easy or obvious.

2. Combining the results from independent processes may require further processing.

3. Still limited by the processing capacity of a single machine


Analyzing the Data with Hadoop

MapReduce


Scaling Out

To scale out, we need to store the data in a distributed filesystem(typically HDFS)

Tasks are scheduled by YARN.


Hadoop divides the input to a MapReduce job into fixed-size pieces called inputsplits. For most jobs, a good split size tends to be the size of anHDFS block, which is 128MB by default.


Data Locality Optimization: Hadoop does it best to run the map task on a node where the input data resides in HDFS. / Reduce task don't have the advantage of data locality.


Combiner reduce data transfered


Hadoop Streaming

Hadoop Streaming uses Unix standard streams as the interface between Hadoop and your program, so you can read standard input and write to standard output to write your MapReduce program. (Good for text processing)




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值