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的更多相关文章

  1. Hadoop权威指南:MapReduce应用开发

    Hadoop权威指南:MapReduce应用开发 [TOC] 一般流程 编写map函数和reduce函数 编写驱动程序运行作业 用于配置的API Hadoop中的组件是通过Hadoop自己的配置API ...

  2. hadoop权威指南学习(一) - 天气预报MapReduce程序的开发和部署

    看过Tom White写的Hadoop权威指南(大象书)的朋友一定得从第一个天气预报的Map Reduce程序所吸引, 殊不知,Tom White大牛虽然在书中写了程序和讲解了原理,但是他以为你们都会 ...

  3. Hadoop权威指南学习笔记二

    MapReduce简单介绍 声明:本文是本人基于Hadoop权威指南学习的一些个人理解和笔记,仅供学习參考,有什么不到之处还望指出,一起学习一起进步. 转载请注明:http://blog.csdn.n ...

  4. Hadoop权威指南:压缩

    Hadoop权威指南:压缩 [TOC] 文件压缩的两个好处: 减少储存文件所需要的磁盘空间 加速数据在网络和磁盘上的传输 压缩格式总结: 压缩格式 工具 算法 文件扩展名 是否可切分 DEFLATE ...

  5. Hadoop权威指南:HDFS-Hadoop存档

    Hadoop权威指南:HDFS-Hadoop存档 [TOC] 每个文件按块方式存储, 每个块的元数据存储在namenode的内存中 Hadoop存档文件或HAR文件是一个更高效的文件存档工具,它将文件 ...

  6. Hadoop权威指南:通过distcp并行复制

    Hadoop权威指南:通过distcp并行复制 distcp是一个分布式复制程序,改程序可以从Hadoop文件系统间复制大量数据,也可以将大量的数据复制到Hadoop中 distcp的典型应用是在两个 ...

  7. Hadoop权威指南学习笔记一

    Hadoop简单介绍 声明:本文是本人基于Hadoop权威指南学习的一些个人理解和笔记,仅供学习參考,有什么不到之处还望指出.一起学习一起进步. 转载请注明:http://blog.csdn.net/ ...

  8. 《Hadoop权威指南》读书笔记1

    <Hadoop权威指南>读书笔记 Day1 第一章 1.MapReduce适合一次写入.多次读取数据的应用,关系型数据库则更适合持续更新的数据集. 2.MapReduce是一种线性的可伸缩 ...

  9. 《hadoop权威指南》关于hive的第一个小例子的演示

    本文是<hadoop权威指南>关于hive的小例子,通过这个例子可以很好地看出来hive是个什么东西. 前提是已经配置好hive的远程连接版本的环境,我是用了MYSQL数据库保存元数据. ...

随机推荐

  1. java 格式判断

    public class FormatChecker { /** * 判断是否含有汉字 * @param string */ public static boolean containChinese( ...

  2. 腾讯云(centos7)上安装并配置PHP

    1.查看yum上的php $ yum list php Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cach ...

  3. java的final变量理解

    java的final变量理解 final基本类型是数值不能改变 final对象是引用不能改变,对象其自身是可以被修改的.

  4. Examples_08_03

    访问本地程序.http://192.168.1.103/preg_match/test.php,如果换成localhost或者127.0.0.1,则会导致无法访问. http://blog.csdn. ...

  5. 数据库操作封装类 DBHelper.cs

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Co ...

  6. FileUpload 简单上传+小预览

    页面代码 : <form id="form1" runat="server"> <div> <asp:FileUpload ID= ...

  7. 数据转换错误,java.lang.NumberFormatException: null

    今天写项目时报了一个数组转换错误的异常,让我找了半天5555 -_- . 一般出现这种错误呢,情况都是parseInt转换所触发的,像下面这行代码 int factorOneInt = Integer ...

  8. JNI类型与C/C++映射关系

    Java 类型 本地类型 描述 boolean jboolean C/C++8位整型 byte jbyte C/C++带符号的8位整型 char jchar C/C++无符号的16位整型 short ...

  9. 关于oracle dbms_job 定时执行的内容。

    一.设置初始化参数 job_queue_processessql> alter system set job_queue_processes=n;(n>0)job_queue_proces ...

  10. oracle单行函数之数字函数

    round--四舍五入函数 trunc--截断函数 mod--求余函数 round和trunc除了可以操作数字外还可以操作日期. Demo SQL),),),),) from dual ; ) ) ) ...