笔记:Hadoop权威指南 第7章 MapReduce 的类型与格式

一、输入输出类型

map 输出的key、value类型与reduce 输入的key、value 一致。


二、默认的MapReduce作业

默认Map:IdentityMapper

默认Reduce:IdentityReducer

默认Partitioner:HashPartitioner


三、输入/输出格式

FileInputFormat:可添加一个或多个输入路径

CombineFileInputFormat:可以将多个小文件打包到一个分片

不切分:覆盖isSplitable 方法


文本:TextInputFormat   / TextOutputFormat

KeyValueTextInputFormat

NLineInputFormat

SequenceFileInputFormat

SequenceFileAsTextInputFormat

SequenceFileAsBinaryInputFormat   /SequenceFileAsBinaryOutputFormat 

MultipleInputs   / MultipleOutputs

DBInputFormat









原文地址:https://www.cnblogs.com/leeeee/p/7276210.html