-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-44509][PYTHON][CONNECT] Add job cancellation API set in Spark Connect Python client #42120
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
juliuszsompolski
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, thank you!
|
Merged to master and branch-3.5. |
…Connect Python client ### What changes were proposed in this pull request? This PR proposes the Python implementations for #42009. ### Why are the changes needed? For the feature parity, and better control of query cancelation in Spark Connect ### Does this PR introduce _any_ user-facing change? Yes. New Apis in Spark Connect Python client: ``` SparkSession.addTag SparkSession.removeTag SparkSession.getTags SparkSession.clearTags SparkSession.interruptTag SparkSession.interruptOperation ``` ### How was this patch tested? Unittests were added, and manually tested too. Closes #42120 from HyukjinKwon/SPARK-44509. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]> (cherry picked from commit 5ee462d) Signed-off-by: Hyukjin Kwon <[email protected]>
| the $USER environment. Defining the user ID as part of the connection string | ||
| takes precedence. | ||
| """ | ||
| self.thread_local = threading.local() |
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.
BTW, there is difference here. Python's threadlocal isn't inheritable (and there's no such implementation in Python). So we should somehow workaround this ...
…cancellation API ### What changes were proposed in this pull request? This PR is a kind of a followup of #42120. This addresses my own comment at #42120 (comment) by adding the support of `InheritableThread` with Spark Connect. ### Why are the changes needed? In order to allow the thread local hierarchy supported in Scala side. ### Does this PR introduce _any_ user-facing change? The main PR is not released out yet so it doesn't have user-facing change. ### How was this patch tested? Unittests were added. Closes #42149 from HyukjinKwon/SPARK-44509-followup. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
### What changes were proposed in this pull request? This PR is a followup of #42120 that fixes the test class name from `ArrowParityTests` to `JobCancellationTests`. ### Why are the changes needed? The test class name doesn't make sense. It tests job cancellation. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Existing unittests should be good enough. Closes #42229 from HyukjinKwon/minor-rename. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
### What changes were proposed in this pull request? This PR is a followup of #42120 that fixes the test class name from `ArrowParityTests` to `JobCancellationTests`. ### Why are the changes needed? The test class name doesn't make sense. It tests job cancellation. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Existing unittests should be good enough. Closes #42229 from HyukjinKwon/minor-rename. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]> (cherry picked from commit af6e177) Signed-off-by: Hyukjin Kwon <[email protected]>
What changes were proposed in this pull request?
This PR proposes the Python implementations for #42009.
Why are the changes needed?
For the feature parity, and better control of query cancelation in Spark Connect
Does this PR introduce any user-facing change?
Yes. New Apis in Spark Connect Python client:
How was this patch tested?
Unittests were added, and manually tested too.