-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-51048][CORE] Support stop java spark context with exit code #49746
Conversation
Hi @dongjoon-hyun could you please take a look, thank you ! |
@@ -552,6 +552,11 @@ class JavaSparkContext(val sc: SparkContext) extends Closeable { | |||
sc.stop() | |||
} | |||
|
|||
/** Shut down the SparkContext with exit code. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add the JavaDoc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, please re-review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can copy and paste from Scala's one ..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done @HyukjinKwon , please re-review. Test case failing seems to be unrelated
Hi @HyukjinKwon Kindly merge the PR if all looks good. |
Merged to master. |
What changes were proposed in this pull request?
Considering there is support to stop spark context with required exit code, This PR aims to use the same to add it to java spark context as well.
Why are the changes needed?
Currently to use
stop(exitCode)
method for JavaSparkContext, user has to calljavaSparkContextsparkContext.stop(exitCode)
.Post this PR user can directly do
javaSparkContextsparkContext.stop(exitCode)
to invoke same.Does this PR introduce any user-facing change?
No, it introduces an extra method in JavaSparkContext class
How was this patch tested?
This was tested in internal/production k8 cluster
Was this patch authored or co-authored using generative AI tooling?
No