Skip to content

Commit a7ce23c

Browse files
committed
[KYUUBI #7220] Proactive cleanup kubernetes terminated application info
### Why are the changes needed? Proactive cleanup kubernetes terminated application info instead of rely on the guava cache internal expiration. ### How was this patch tested? GA. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #7220 from turboFei/proactive_cleanupcache. Closes #7220 127a907 [Wang, Fei] Proactive cleanup kubernetes terminated application info Authored-by: Wang, Fei <[email protected]> Signed-off-by: Wang, Fei <[email protected]>
1 parent 44ce1a5 commit a7ce23c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

kyuubi-server/src/main/scala/org/apache/kyuubi/engine/KubernetesApplicationOperation.scala

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,8 @@ class KubernetesApplicationOperation extends ApplicationOperation with Logging {
199199
expireCleanUpTriggerCacheExecutor,
200200
() => {
201201
try {
202-
Option(cleanupTerminatedAppInfoTrigger).foreach { trigger =>
203-
trigger.asMap().asScala.foreach {
204-
case (key, _) =>
205-
// do get to trigger cache eviction
206-
trigger.getIfPresent(key)
207-
}
208-
}
202+
// Proactively remove expired entries from the cache
203+
Option(cleanupTerminatedAppInfoTrigger).foreach(_.cleanUp())
209204
} catch {
210205
case NonFatal(e) => error("Failed to evict clean up terminated app cache", e)
211206
}

0 commit comments

Comments
 (0)