您当前的位置: 首页 > 

段智华

暂无认证

  • 0浏览

    0关注

    1232博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

ExecutorBackend的异常处理

段智华 发布时间:2017-06-17 20:40:14 ,浏览量:0

5.3.4    ExecutorBackend的异常处理  

CoarseGrainedExecutorBackend在运行中出现异常,将调用exitExecutor方法进行处理,处理以后系统退出。exitExecutor这个函数可以由其他子类重载来处理,executor执行的退出方式不同。例如:当executor挂掉了,后台程序可能不会让父进程也挂掉。如果需通知Driver,Driver将清理挂掉的executor的数据。

CoarseGrainedExecutorBackend的exitExecutor方法源码:

1.             protected def exitExecutor(code: Int,

2.                                      reason: String,

3.                                      throwable:Throwable = null,

4.                                      notifyDriver:Boolean = true) = {

5.             val message = "Executorself-exiting due to : " + reason

6.             if (throwable != null) {

7.               logError(message, throwable)

8.             } else {

9.               logError(message)

10.          }

11.       

12.          if (notify

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

微信扫码登录

0.0595s