Skip to content

KYLIN-5245 fix incorrect job status is displayed when deployMode is c…#1959

Merged
hit-lacus merged 2 commits intoapache:mainfrom
liuzhao-lz:kylin4-5245
Oct 14, 2022
Merged

KYLIN-5245 fix incorrect job status is displayed when deployMode is c…#1959
hit-lacus merged 2 commits intoapache:mainfrom
liuzhao-lz:kylin4-5245

Conversation

@liuzhao-lz
Copy link

@liuzhao-lz liuzhao-lz commented Aug 31, 2022

Proposed changes

修复在kylin4中当以 spark.master=yarn,spark.submit.deployMode=cluster 提交build job,如在job执行中发生异常,然而最终显示的job状态却为success。我发现问题主要出在org.apache.spark.application.JobWorkSpace 上:
org.apache.spark.application.JobWorkSpace#execute 调用 run 方法,run 方法中会调用 eventLoop.post(RunJob()),JobWorker 在收到 RunJob 后会执行它的 execute() 方法,execute() 方法执行中发生异常会在catche 异常后调用eventLoop.post(UnknownThrowable(exception)),而 JobMonitor 在收到 UnknownThrowable 后会调用eventLoop.post(JobFailed("Unknown error occurred during the job.", ur.throwable)),JobWorkSpace 在 eventLoop 中注册的监听用于”JobSucceeded“、”JobFailed“ 处理,其中对 JobFailed 事件的处理仅是将 statusCode=1,所以 SparkEntry的main方法会正常结束,job server 的 CliCommandExecutor 获取到process退出码0,错误认为作业运行成功

Branch to commit

  • Branch kylin3 for v2.x to v3.x
  • Branch kylin4 for v4.x
  • Branch kylin5 for v5.x

Types of changes

What types of changes does your code introduce to Kylin?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have created an issue on Kylin's jira, and have described the bug/feature there in detail
  • Commit messages in my PR start with the related jira ID, like "KYLIN-0000 Make Kylin project open-source"
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at user@kylin.apache.org or dev@kylin.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@liyang-kylin
Copy link
Contributor

liyang-kylin commented Sep 3, 2022

需要更多信息在 PR 描述里,比如 Proposed changes 等。

code change 看起来问题不大。

@liuzhao-lz
Copy link
Author

好的,我将添加变更描述

@hit-lacus hit-lacus merged commit 6face85 into apache:main Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants