hadoop2.2 MapReduce and yarn(一)

来源:互联网 发布:android 7.0 源码 编辑:程序博客网 时间:2024/05/16 01:17

1. MapReduce前后框架对比:


2. MapReduce主要操作对象

Driver:是一个很重要的内容,主要负责MapReduce job的初始化,它定义了job的配置 输入输出格式 使用的combiner和partitioner.

Context:drivers mappers reducers...的上下文环境.

InputData:

InputFormat:

InputSplit:定义一个map任务的数据,分布式InputData由很多个Input Split组成.

RecordReader:从数据源读取数据到hdfs

Mapper:

Partition

Shuffle:从map 输出数据流到reducers就叫shuffling

Sort

Reducer

OutputFormat

RecordWriter

Combiner

DistributedCache


3. YARN RPC协议:


4. YARN应用程序的设计:

a) 在YARN运行的应用程序主要有两类:短应用程序(能在预知的时间内完成的,如:MapReduce)和长应用程序;

b) YARN框架中的维护进程:ResourceManager(ApplicationsManager & ResourceScheduler)和NodeManager,客户端的程序向ResourceManager提交ApplicationMaster查询应用程序运行状态,ApplicationMaster向ResourceManager申请资源(Container)并通知NameNode启动Container,ApplicationMaster同时监控任务的运行状态,在失败时重新申请资源.

c) YARN应用下涉及的RPC协议:ApplicationClientProtocol & ApplicationMasterProtocol & ContainerManagementProtocol


0 0
原创粉丝点击