hadoop权威指南 chapter2 MapReduce
MapReduce
MapReduce is a programming model for data processing. The model is simple, yet not too simple to express useful programs in. Hadoop can run MapReduce programs written
in various languages; in this chapter, we shall look at the same program expressed in Java, Ruby, Python, and C++. Most important, MapReduce programs are inherently parallel, thus putting very large-scale data analysis into the hands of anyone with enough machines
at their disposal. MapReduce comes into its own for large datasets, so let’s start by looking at one.
2.1 Analyzing the Data with Hadoop 使用Hadoop分析数据
To take advantage of the parallel processing that Hadoop provides, we need to express our query as a MapReduce job. After some local, small-scale testing, we will be able to
run it on a cluster of machines.
利用Hadoop提供的并发处理的优势,我们须要使用MapReduce job来表达一个查询,通过一个本地化、小范围的測试,我们就能够在集群机器上执行了。
2.2 Map and Reduce
MapReduce works by breaking the processing into two phases: the map phase and the reduce phase.
Each phase has key-value pairs as input and output, the types of which may be chosen by the programmer. The programmer also specifies two functions: the map function and the reduce function.
map函数和 reduce函数 输入输出键值对
2.3 Scaling Out 横向扩展
Data Flow 数据流
A MapReduce job is a unit of work that the client wants to be performed: it consists of the input data, the MapReduce program, and configuration information. Hadoop runs the job by dividing it into tasks, of which there are two types: map tasks and reduce
tasks.
job 是client运行的一个工作单元。由输入数据、程序和配置信息组成。
hadoop权威指南 chapter2 MapReduce的更多相关文章
- Hadoop权威指南:MapReduce应用开发
Hadoop权威指南:MapReduce应用开发 [TOC] 一般流程 编写map函数和reduce函数 编写驱动程序运行作业 用于配置的API Hadoop中的组件是通过Hadoop自己的配置API ...
- hadoop权威指南学习(一) - 天气预报MapReduce程序的开发和部署
看过Tom White写的Hadoop权威指南(大象书)的朋友一定得从第一个天气预报的Map Reduce程序所吸引, 殊不知,Tom White大牛虽然在书中写了程序和讲解了原理,但是他以为你们都会 ...
- Hadoop权威指南学习笔记二
MapReduce简单介绍 声明:本文是本人基于Hadoop权威指南学习的一些个人理解和笔记,仅供学习參考,有什么不到之处还望指出,一起学习一起进步. 转载请注明:http://blog.csdn.n ...
- Hadoop权威指南:压缩
Hadoop权威指南:压缩 [TOC] 文件压缩的两个好处: 减少储存文件所需要的磁盘空间 加速数据在网络和磁盘上的传输 压缩格式总结: 压缩格式 工具 算法 文件扩展名 是否可切分 DEFLATE ...
- Hadoop权威指南:HDFS-Hadoop存档
Hadoop权威指南:HDFS-Hadoop存档 [TOC] 每个文件按块方式存储, 每个块的元数据存储在namenode的内存中 Hadoop存档文件或HAR文件是一个更高效的文件存档工具,它将文件 ...
- Hadoop权威指南:通过distcp并行复制
Hadoop权威指南:通过distcp并行复制 distcp是一个分布式复制程序,改程序可以从Hadoop文件系统间复制大量数据,也可以将大量的数据复制到Hadoop中 distcp的典型应用是在两个 ...
- Hadoop权威指南学习笔记一
Hadoop简单介绍 声明:本文是本人基于Hadoop权威指南学习的一些个人理解和笔记,仅供学习參考,有什么不到之处还望指出.一起学习一起进步. 转载请注明:http://blog.csdn.net/ ...
- 《Hadoop权威指南》读书笔记1
<Hadoop权威指南>读书笔记 Day1 第一章 1.MapReduce适合一次写入.多次读取数据的应用,关系型数据库则更适合持续更新的数据集. 2.MapReduce是一种线性的可伸缩 ...
- 《hadoop权威指南》关于hive的第一个小例子的演示
本文是<hadoop权威指南>关于hive的小例子,通过这个例子可以很好地看出来hive是个什么东西. 前提是已经配置好hive的远程连接版本的环境,我是用了MYSQL数据库保存元数据. ...
随机推荐
- 图解JavaScript知识点
- 解决 jsp eclipse异常 【The import javax.servlet cannot be resolved】
[ <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 报错][impor ...
- linux的exec命令
linux的exec命令可以多进程执行,如果在浏览器访问使用http协议,会存在内存溢出和执行时间问题.
- iOS判断UIScrollView的滚动方向
- (void) scrollViewDidScroll:(UIScrollView *)scrollView { CGFloat newY = scrollView.contentOffset.y; ...
- C#垃圾回收
析构方法: 我们知道引用类型都有构造方法(constructor),相对应的也有一个析构方法(destructor).顾名思义,构造方法,就是在创建这个对象时,要执行的方法.例如,我们可以通过构造方法 ...
- NetBeans使用技巧记录
1.窗体字体大小设置: 在etc文件夹下的netbeans.conf中添加,12表示字体大小,12正合适. netbeans_default_options="--fontsize 12 - ...
- mysql group by 用法解析
group by语法可以根据给定数据列的每个成员对查询结果进行分组统计,最终得到一个分组汇总表.SELECT子句中的列名必须为分组列或列函数.列函数对于GROUP BY子句定义的每个组各返回一个结果. ...
- react相关
react 简单入门 ant 蚂蚁金服react组件 redux 阮一峰入门react material-ui组件库 webpack入门 http://www.jianshu.com/p/42e115 ...
- 关闭Centos的自动更新
昨天跟老板汇报,提到我们的linux服务器每天自动更新,老板大发雷霆,说生产系统不能够这样,非常不安全,一个师兄也提到他原来在移动的时候,服务器更新也是很谨慎的事情.看来我的思维太技术了,不够全面,所 ...
- python之scrapy入门教程
看这篇文章的人,我假设你们都已经学会了python(派森),然后下面的知识都是python的扩展(框架). 在这篇入门教程中,我们假定你已经安装了Scrapy.如果你还没有安装,那么请参考安装指南. ...