-
Notifications
You must be signed in to change notification settings - Fork 2.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
[HUDI-8941] Stop spark context with proper exit code in HoodieStreamer #12742
base: master
Are you sure you want to change the base?
Conversation
} finally { | ||
jssc.stop(); | ||
jssc.sc().stop(exitCode); |
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.
Thanks for the improvement. It looks like this API is introduced in Spark 3.4, so it does not compile on Spark 3.3. Could you adapt your change on that?
@hudi-bot run azure |
@yihua have made the change to run with spark 3.3 as well. Can you please review now. |
@hudi-bot run azure |
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.
LGTM
Change Logs
Currently in Hoodiestreamer,
jssc.stop();
is being called which always stops the application with exit code 0 even in case of any exception is raised.With new spark versions, exit code can be passed while stopping spark context.
For reference : https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkContext.scala#L2306
This PR enables spark context to shutdown with proper exit code
Impact
NA
Risk level (write none, low medium or high below)
NA
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none".
ticket number here and follow the instruction to make
changes to the website.
Contributor's checklist