From 4b1112739b97c086542ad1559b4345e4cbfcd07a Mon Sep 17 00:00:00 2001 From: fwang12 Date: Fri, 24 Nov 2023 15:54:41 +0800 Subject: [PATCH] stop trigger before k8s clients --- .../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 5781a036aa8..922dd9a1597 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)