pan3793 commented on code in PR #7101: URL: https://github.com/apache/kyuubi/pull/7101#discussion_r2156154086
########## kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala: ########## @@ -77,7 +77,29 @@ class KubernetesApplicationOperation extends ApplicationOperation with Logging { private def getOrCreateKubernetesClient(kubernetesInfo: KubernetesInfo): KubernetesClient = { checkKubernetesInfo(kubernetesInfo) - kubernetesClients.computeIfAbsent(kubernetesInfo, kInfo => buildKubernetesClient(kInfo)) + kubernetesClients.computeIfAbsent( + kubernetesInfo, + kInfo => { + val kubernetesClient = buildKubernetesClient(kInfo) + val existingPods = Review Comment: the logic looks too heavy for a `getOrCreate*` method, could you extract it to a method and add a config? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org For additional commands, e-mail: notifications-h...@kyuubi.apache.org