这个根据功能模块分为几个组:
[Job描述组,包含Job,上下文,ID,Counter]
JobContext
A read-only view of the job that is provided to the tasks while they are running.
Job
/**
* The job submitter's view of the Job. It allows the user to configure the
* job, submit it, control its execution, and query the state. The set methods
* only work until the job is submitted, afterwards they will throw an
* IllegalStateException.
*/
JobID
例如:'job_200707121733_0003'由三部分组成。
固定前缀job
jobtracker的启动时间
job的编号
不要使用string作为id,用类型,这个是个好的编程方案。
TaskID
task_200707121733_0003_m_000005
task+jobid+(map or reduce)+number
TaskAttemptID
attempt_200707121733_0003_m_000005_0
attempt+taskid+number
ReduceContext
面向字节流依次处理key-value对。
Counter
对性能的追求,name和displayName相同时只存储一次。
CounterGroup
Counter的分组合并。
不序列化name属性。
Counters
提供Enum的cache,CounterGroup的name序列化在这里进行。
[Input Output组]
InputFormat
划分InputSplit,创建RecordReader。
InputSplit
byte-oriented view
RecordReader
record-oriented view
FileInputFormat
文件inputFormat的父类。
TextInputFormat
LineRecordReader
如果Split跨block怎么办。
FileSplit
OutputFormat RecordWriter OutputCommitter
[核心框架组]
Mapper
太核心的概念。
可以覆盖run方法,run方法提供默认map核心执行框架。
可以参考多线程mapper。
提供了几个默认的实现,在我们开发Mapper时可以参考。
反向Mapper(颠倒key-value对)。
单词计数Mapper。
多线程Mapper。
Partitioner
Partitions the key space.
提供了一个默认实现。根据key的hashCode划分。
Reducer
Shuffle,Sort,SecondarySort,Reduce.
提供了2个默认实现,都是对key的计数加和。
- 大小: 50.1 KB
- 大小: 36.1 KB
- 大小: 59.3 KB
- 大小: 38.2 KB
分享到:
相关推荐
The Joins query by using Hadoop and map reduce
hadoop_map_reduce Hadoop Map reduce 示例
MapReduce中最重要的两个词就是Map(映射)和Reduce(规约)。初看Map/Reduce这两个词,熟悉Function Language的人一定感觉很熟悉。FP把这样的函数称为”higher order function”(”High order function”被成为...
MapReduce中最重要的两个词就是Map(映射)和Reduce(规约)。初看Map/Reduce这两个词,熟悉Function Language的人一定感觉很熟悉。FP把这样的函数称为”higher order function”(”High order function”被成为...
对于输入中的每一个, value> pair 进行Map操作,将中间结果Buffer在Memory里; 定期的(或者根据内存状态),将Buffer中的中间信息Dump到本地磁盘上,并且把文件信息传回给Master(Master需要把这些信息发送给...
hadoop map reduce mapreduce
#Hadoop Streaming 在 Yosemite 上使用 Node JS 或 Python 介绍配置 HADOOP_HOME 定位 Hadoop 流 JAR 配置映射器配置减速器下载和上传数据源运行 Map/Reduce 作业下载结果参考##Introduction 在大多数情况下,我遵循...
Map and Reduce Java MapReduce Scaling Out Data Flow Combiner Functions Running a Distributed MapReduce Job Hadoop Streaming Ruby Python import import import import import import org.apache.hadoop.fs...
Map and Reduce 20 Java MapReduce 22 Scaling Out 30 Data Flow 31 Combiner Functions 34 Running a Distributed MapReduce Job 37 Hadoop Streaming 37 Ruby 37 Python 40 iii www.it-ebooks.info Hadoop Pipes ...
实验数据结果表明,由于Spark平台主要基于分布式的内存计算,而Hadoop中的Mapreduce框架在每个map或reduce阶段存在回写或读取硬盘操作,所以Spark的性能优势远远在于Hadoop之上,但前者以使用大量内存进行数据存贮或...
Hadoop MapReduce 教程 这篇教程从用户的角度出发,全面地介绍了Hadoop Map/Reduce框架的各个方面
一个简单SQL引擎,用于在Hadoop Map-Reduce之上实现的查询详细解释见: : ##安装 安装 Java JDK 1.7 并设置 JAVA_HOME 下载 Apache Hadoop 最新稳定版 2: : 我使用的是 2.5.1 版 解压缩 hadoop 文件并将 ...
Hadoop Map Reduce教程,介绍hadoop map/reduce框架的各个方面
Map_Reduce_Hadoop 实现map-reduce程序,执行等值连接。
使用Hadoop Map Reduce分析股票市场 如何运行程序? 首先在您的系统中安装Hadoop。 请按照以下步骤进行安装 然后开始执行给定的命令 cd hadoop-3.2.2 / sbin ./start-dfs.sh ./start-yarn.sh jps 导出HADOOP_...
hadoop中map/reduce自学资料合集
在"主機一" 上,執行下面的命令停止Map/Reduce: • /opt/hadoop$ bin/stop-mapred.sh bin/stop-mapred.sh腳本會參照jobtracker上${HADOOP_CONF_DIR}/slaves文件的內容,在所有列出的slave上停 止tasktracker。 ◦...
hadoop的map reduce 学习手册,很实用
人脸识别,车辆识别,一人一档,一车一档 hadoop map reduce hbase