Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

prathit06
Copy link
Contributor

@prathit06 prathit06 commented Jan 31, 2025

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 call javaSparkContextsparkContext.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

@github-actions github-actions bot added the CORE label Jan 31, 2025
@prathit06
Copy link
Contributor Author

Hi @dongjoon-hyun could you please take a look, thank you !

@HyukjinKwon HyukjinKwon changed the title SPARK-51048 | Support stop java spark context with exit code [SPARK-51048][CORE] Support stop java spark context with exit code Feb 3, 2025
@@ -552,6 +552,11 @@ class JavaSparkContext(val sc: SparkContext) extends Closeable {
sc.stop()
}

/** Shut down the SparkContext with exit code. */
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, please re-review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants