-
Notifications
You must be signed in to change notification settings - Fork 930
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
[KYUUBI #5513][BATCH] Always redirect delete batch request to Kyuubi instance that owns batch session #5514
Conversation
… enabled v2 and current kyuubi not submitted this batch
} | ||
} else if (batchV2Enabled(metadata.requestConf) && metadata.state == "INITIALIZED" && | ||
batchService.get.cancelUnscheduledBatch(batchId)) { | ||
new CloseBatchResponse(true, s"Unscheduled batch $batchId is canceled.") | ||
} else if (metadata.kyuubiInstance != fe.connectionUrl) { |
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.
should we add condition metadata.kyuubiInstance != null
?
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.
Right, metadata.kyuubiInstance = null may happen when this batch picked within this function. Due to we won't fresh batch state by getting newest metadata.
We can call this delete function again to handle this case
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala
Outdated
Show resolved
Hide resolved
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala
Outdated
Show resolved
Hide resolved
…atchesResource.scala Co-authored-by: Cheng Pan <[email protected]>
…atchesResource.scala Co-authored-by: Cheng Pan <[email protected]>
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala
Outdated
Show resolved
Hide resolved
…atchesResource.scala
kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala
Outdated
Show resolved
Hide resolved
…atchesResource.scala
…instance that owns batch session ### _Why are the changes needed?_ Fixed an issue where spark submit(BatchJobSubmission) could not be closed when invoking the delete interface to delete a batch in the process of submission with batch v2 feature. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request - [x] Run exist unit test. ### _Was this patch authored or co-authored using generative AI tooling?_ No Closes #5514 from zwangsheng/KYUUBI#5513. Closes #5513 868c026 [Cheng Pan] Update kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala 1e44acf [Cheng Pan] Update kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala f0b3a53 [Binjie Yang] Update kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala a238e45 [Binjie Yang] Update kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala 565b938 [zwangsheng] modify comments 86ef016 [zwangsheng] add comment and catch spec case 4c40863 [zwangsheng] fix comments 73f89f0 [zwangsheng] [KYUUBI #5513][Improvement][BATCH] Redirect delete batch request when enabled v2 and current kyuubi not submitted this batch Lead-authored-by: zwangsheng <[email protected]> Co-authored-by: Cheng Pan <[email protected]> Co-authored-by: Binjie Yang <[email protected]> Signed-off-by: Cheng Pan <[email protected]> (cherry picked from commit feb9d16) Signed-off-by: Cheng Pan <[email protected]>
Merged to master/1.8 |
…yuubi instance that owns batch session ### _Why are the changes needed?_ Fixed an issue where spark submit(BatchJobSubmission) could not be closed when invoking the delete interface to delete a batch in the process of submission with batch v2 feature. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request - [x] Run exist unit test. ### _Was this patch authored or co-authored using generative AI tooling?_ No Closes apache#5514 from zwangsheng/KYUUBI#5513. Closes apache#5513 868c026 [Cheng Pan] Update kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala 1e44acf [Cheng Pan] Update kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala f0b3a53 [Binjie Yang] Update kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala a238e45 [Binjie Yang] Update kyuubi-server/src/main/scala/org/apache/kyuubi/server/api/v1/BatchesResource.scala 565b938 [zwangsheng] modify comments 86ef016 [zwangsheng] add comment and catch spec case 4c40863 [zwangsheng] fix comments 73f89f0 [zwangsheng] [KYUUBI apache#5513][Improvement][BATCH] Redirect delete batch request when enabled v2 and current kyuubi not submitted this batch Lead-authored-by: zwangsheng <[email protected]> Co-authored-by: Cheng Pan <[email protected]> Co-authored-by: Binjie Yang <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
Why are the changes needed?
Fixed an issue where spark submit(BatchJobSubmission) could not be closed when invoking the delete interface to delete a batch in the process of submission with batch v2 feature.
How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before make a pull request
Run exist unit test.
Was this patch authored or co-authored using generative AI tooling?
No