-
Notifications
You must be signed in to change notification settings - Fork 985
[KYUUBI #2419] Release engine during closing kyuubi server session if share level is connection #2482
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
…n during closing session
kyuubi-server/src/main/scala/org/apache/kyuubi/operation/BatchJobSubmission.scala
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #2482 +/- ##
============================================
+ Coverage 63.46% 63.55% +0.08%
Complexity 69 69
============================================
Files 371 371
Lines 17582 17710 +128
Branches 2345 2358 +13
============================================
+ Hits 11158 11255 +97
- Misses 5392 5408 +16
- Partials 1032 1047 +15
Continue to review full report at Codecov.
|
| close(!waitCompletion) | ||
| } | ||
|
|
||
| def shutdown(): Unit = { |
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.
We do not need an another method, just
def close(destroyForcibly: Boolean = waitCompletion): Unit = {
| if (shareLevel == CONNECTION && builder != null) { | ||
| try { | ||
| builder.shutdown() | ||
| engineManager.killApplication(builder.clusterManager(), engineRefId) |
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.
the ordering is a little confused: we have closed the builder, but get clusterManager from it again. It seems better:
val clusterManager = builder.clusterManager()
builder.close()
engineManager.killApplication(clusterManager)|
@wForget thank you for the contribution, I think the title should be refine to: |
|
thanks, merging to master |
### _Why are the changes needed?_ We do not need force close engine builder and application if open session succeded. The engine itself will shutdown in connection level. This pr tries to fix regression of #2482 ### _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/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4241 from ulysses-you/skip-close. Closes #4241 0b28041 [ulysses-you] style 1636912 [ulysses-you] Only force close engine ref when open session failed Authored-by: ulysses-you <ulyssesyou18@gmail.com> Signed-off-by: ulyssesyou <ulyssesyou@apache.org>
We do not need force close engine builder and application if open session succeded. The engine itself will shutdown in connection level. This pr tries to fix regression of #2482 - [ ] 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/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4241 from ulysses-you/skip-close. Closes #4241 0b28041 [ulysses-you] style 1636912 [ulysses-you] Only force close engine ref when open session failed Authored-by: ulysses-you <ulyssesyou18@gmail.com> Signed-off-by: ulyssesyou <ulyssesyou@apache.org> (cherry picked from commit 8760eee) Signed-off-by: ulyssesyou <ulyssesyou@apache.org>
Why are the changes needed?
close #2419
We need to clean up the ProcBuilder process and engine application when the session is closed.
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