MapReduce2提交到yarn上工作流程

先来一副图展示MapReduce2作业提交到yarn上的流程。

1.用户向yarn的RM提交应用程序,其中包括Application Master程序 启动ApplicationMaster命令等。

2.RM首先为该app分配一个container,并与对应的nm通信,要求nm在这个container中启动应用程序的Application master

3.application master首先向applications manager注册,这样就可以通过web 8888,查看应用程序的运行状态,且监控它的运行状态

4.application master向resource sheduler申请和领取资源。

5.application master领取到资源后,便于对应的nm通信,要求它启动container。

6.nm节点启动container容器,运行task任务。

7.各个容器中的任务,通过rpc向application master汇报自己的状态和进度,让application master随时掌握各个任务task的运行状态,在任务失败的时候,重新任务。这时候用户就可以通过web界面实时查看应用程序的运行状态。

8.application master运行完毕后,application master向applications master注销并关闭。

当用户向Yarn中提交一个应用程序,分为2阶段:
1.启动app master  1,2
2.app master申请资源 运行任务 结束任务 3-8

猜你喜欢

转载自blog.csdn.net/u010506876/article/details/83045100
今日推荐