您当前的位置: 首页 > 

段智华

暂无认证

  • 2浏览

    0关注

    1232博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Executor到底是什么时候启动的?

段智华 发布时间:2017-06-18 21:16:10 ,浏览量:2

6.4.1 Executor到底是什么时候启动的?

在SparkContext启动之后,StandaloneSchedulerBackend中会new出一个StandaloneAppClient,StandaloneAppClient中有一个名叫ClientEndPoint的内部类,在创建ClientEndpoint会传入Command来指定具体为当前应用程序启动的Executor进行的入口类的名称为CoarseGrainedExecutorBackend ClientEndPoint继承自ThreadSafeRpcEndpoint,其通过RPC机制完成和Master的通信。在ClientEndPoint的start方法中,会通过registerWithMaster方法向Master发送RegisterApplication请求,Master收到该请求消息之后,首先通过registerApplication方法完成信息登记,之后将会调用schedule方法,在Worker上启动Executor,Master对RegisterApplication请求处理源代码如下所示。

Master.scala源码:

1.              caseRegisterApplication(description, driver) =>

2.             // TODO Prevent repeatedregistrations from some driver

3.          //Master处于STANDBY(备用)状态,不作处理

4.             if (state ==RecoveryState.STANDBY) {

关注
打赏
1659361485
查看更多评论
立即登录/注册

微信扫码登录

0.1106s