《Hadoop The Definitive Guide》ch07 MapReduce Types and Formats

本章节详细解析了MapReduce数据模型的核心概念,包括Map和Reduce函数的工作原理及输入输出格式。同时,介绍了不同类型的输入和输出方式,如文本、二进制数据以及它们在MapReduce框架中的具体实现。通过深入理解这些内容,读者能够更好地掌握如何高效地处理大规模数据集。

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

MapReduce的数据模型非常简单,它的Map和Reduce函数使用键值对进行输入和输出。本章将深入讨论MapReduce的数据模型,尤其是文本或者二进制类型的数据如何在MapReduce中使用。

1. MapReduce的类型

map和reduce函数遵循以下的形式:

map: (K1, V1) -> list(K2, V2)

reduce: (K2, list(V2)) -> list(K3, V3)

In general, the map input key and value types (K1 and V1) are different from the map output types (K2 and V2). However, the reduce input must have the same types as the
map output, although the reduce output types may be different again (K3 and V3).

2. 输入格式

Text Input 
Binary Input 
Multiple Inputs 
Database Input

3. 输出格式

Text Output 
Binary Output 
Multiple Outputs 
Lazy Output 
Database Output

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值