KYLIN-5245 fix incorrect job status is displayed when deployMode is c…#1959
Merged
hit-lacus merged 2 commits intoapache:mainfrom Oct 14, 2022
Merged
KYLIN-5245 fix incorrect job status is displayed when deployMode is c…#1959hit-lacus merged 2 commits intoapache:mainfrom
hit-lacus merged 2 commits intoapache:mainfrom
Conversation
…luster execution error
Contributor
|
需要更多信息在 PR 描述里,比如 Proposed changes 等。 code change 看起来问题不大。 |
Author
|
好的,我将添加变更描述 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Types of changes
What types of changes does your code introduce to Kylin?
Put an
xin the boxes that applyChecklist
Put an
xin 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.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...