This is an automated email from the ASF dual-hosted git repository.
feiwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new e22a7f7c1 [KYUUBI #5771] [K8S] Cleanup the terminated app info trigger
before clear kubernetes clients
e22a7f7c1 is described below
commit e22a7f7c1b179b92b2a20bf50b327edc82a031b7
Author: fwang12 <[email protected]>
AuthorDate: Fri Nov 24 17:29:05 2023 +0800
[KYUUBI #5771] [K8S] Cleanup the terminated app info trigger before clear
kubernetes clients
# :mag: Description
When stopping KubernetesApplicationOperation, we shall cleanup the
terminated app info trigger before kubernetes clients.
Because for the `removalListener` of `cleanupTerminatedAppInfoTrigger`, it
need to invoke the kubernetes client to cleanup the terminated application pods.
## Issue References ๐
This pull request fixes #
## Describe Your Solution ๐ง
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that are
required for this change.
## Types of changes :bookmark:
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
## Test Plan ๐งช
#### Behavior Without This Pull Request :coffin:
#### Behavior With This Pull Request :tada:
#### Related Unit Tests
---
# Checklists
## ๐ Author Self Checklist
- [x] My code follows the [style
guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html)
of this project
- [ ] I have performed a self-review
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature
works
- [ ] New and existing unit tests pass locally with my changes
- [ ] This patch was not authored or co-authored using [Generative
Tooling](https://www.apache.org/legal/generative-tooling.html)
## ๐ Committer Pre-Merge Checklist
- [x] Pull request title is okay.
- [x] No license issues.
- [x] Milestone correctly set?
- [ ] Test coverage is ok
- [x] Assignees are selected.
- [x] Minimum number of approvals
- [x] No changes are requested
**Be nice. Be informative.**
Closes #5771 from turboFei/stop_k8s_op.
Closes #5771
4b1112739 [fwang12] stop trigger before k8s clients
Authored-by: fwang12 <[email protected]>
Signed-off-by: fwang12 <[email protected]>
---
.../apache/kyuubi/engine/KubernetesApplicationOperation.scala | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git
a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala
b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala
index 5781a036a..922dd9a15 100644
---
a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala
+++
b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala
@@ -241,15 +241,15 @@ class KubernetesApplicationOperation extends
ApplicationOperation with Logging {
}
enginePodInformers.clear()
- kubernetesClients.asScala.foreach { case (_, client) =>
- Utils.tryLogNonFatalError(client.close())
- }
- kubernetesClients.clear()
-
if (cleanupTerminatedAppInfoTrigger != null) {
cleanupTerminatedAppInfoTrigger.cleanUp()
cleanupTerminatedAppInfoTrigger = null
}
+
+ kubernetesClients.asScala.foreach { case (_, client) =>
+ Utils.tryLogNonFatalError(client.close())
+ }
+ kubernetesClients.clear()
}
private class SparkEnginePodEventHandler(kubernetesInfo: KubernetesInfo)