[SPARK-17742][core] Handle child process exit in SparkLauncher.#18877
Closed
vanzin wants to merge 2 commits into
Closed
[SPARK-17742][core] Handle child process exit in SparkLauncher.#18877vanzin wants to merge 2 commits into
vanzin wants to merge 2 commits into
Conversation
Currently the launcher handle does not monitor the child spark-submit process it launches; this means that if the child exits with an error, the handle's state will never change, and an application will not know that the application has failed. This change adds code to monitor the child process, and changes the handle state appropriately when the child process exits. Tested with added unit tests.
|
Test build #80368 has finished for PR 18877 at commit
|
Contributor
Author
ash211
reviewed
Aug 10, 2017
| int ec; | ||
| try { | ||
| ec = childProc.exitValue(); | ||
| } catch (Exception e) { |
Contributor
There was a problem hiding this comment.
might want to log the exception here
| try { | ||
| childProc.waitFor(); | ||
| } catch (Exception e) { | ||
| // Try again. |
And log exceptions. And add a transition to KILLED state that was missing.
|
Test build #80511 has finished for PR 18877 at commit
|
Contributor
Author
|
If there's no more feedback, I plan to push this soon to unblock other work on this module. |
Contributor
Author
|
Alright, merging this to master. |
Member
|
yes @danelkotev |
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.
Currently the launcher handle does not monitor the child spark-submit
process it launches; this means that if the child exits with an error,
the handle's state will never change, and an application will not know
that the application has failed.
This change adds code to monitor the child process, and changes the
handle state appropriately when the child process exits.
Tested with added unit tests.