-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-46575][SQL][FOLLOWUP] Add back HiveThriftServer2.startWithContext(SQLContext) method for compatibility
#45727
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
Conversation
dongjoon-hyun
left a comment
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.
I agree with the goal of this PR, @dragqueen95 . Thank you for making a PR.
- Could you add
@Since(xxxVersionxxx)annotation for both methods to make it clear? - In addition, please enable GitHub Action on your repository to make CI pass. Apache Spark community uses your GitHub Action resource.
HiveThriftServer2.startWithContext(SQLContext) method for compatibility
dongjoon-hyun
left a comment
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.
+1, LGTM (Pending CIs).
To @dragqueen95 , we need to make CI happy.
https://github.com/apache/spark/pull/45727/checks?check_run_id=23117919159
cloud-fan
left a comment
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, pending CI
| @Since("2.0.0") | ||
| @DeveloperApi | ||
| def startWithContext(sqlContext: SQLContext): HiveThriftServer2 = { | ||
| startWithContext(sqlContext, exitOnError) |
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.
Oh, could you give a value for exitOnError, @dragqueen95 ? The value seems to be missed here.
Error: /home/runner/work/spark/spark/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala:88: not found: value exitOnError
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.
true seems to be fine to me.
...e-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala
Outdated
Show resolved
Hide resolved
…/thriftserver/HiveThriftServer2.scala
|
Thank you for the update, @cloud-fan . |
|
thanks, merging to master! |
| * the call logs the error and exits the JVM with exit code -1. When false, the | ||
| * call throws an exception instead. | ||
| */ | ||
| @Since("3.5.2") |
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.
4.0.0?
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.
Oh, I thought #44575 was backported.
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.
To @dragqueen95 , could you make a follow-up to fix this to 4.0.0 since SPARK-46575 is not in branch-3.5?
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.
Raised #45737
|
|

What changes were proposed in this pull request?
#44575 added a default parameter to
HiveThriftServer2.startWithContextAPI. Although this is source-compatible, this is not binary-compatible - for eg. a binary built with new code won't be able to run with the old code. In this PR, we maintain forward and backward compatibility by keeping the API same and introducing a separate API for the additional parameter.Why are the changes needed?
See above
Does this PR introduce any user-facing change?
only developer API change
How was this patch tested?
Existing tests
Was this patch authored or co-authored using generative AI tooling?
no