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 487dd0810 [KYUUBI #5795][FOLLOWUP] Using correct time unit for pod 
cleanup executor
487dd0810 is described below

commit 487dd0810a818ef037a73515226e2be30070cc4e
Author: Fei Wang <[email protected]>
AuthorDate: Fri Dec 15 09:31:55 2023 -0800

    [KYUUBI #5795][FOLLOWUP] Using correct time unit for pod cleanup executor
    
    # :mag: Description
    ## Issue References ๐Ÿ”—
    
    
https://github.com/apache/kyuubi/blob/a0fdead6d257be54127d84f526918e4fd52a18ce/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala#L1234-L1241
    
    The timeunit should be millsecond not minute here.
    
    And using ThreadUtils.scheduleTolerableRunnableWithFixedDelay to prevent 
unexpected issue.
    
    ## 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:
    
    - [ ] 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
    
    - [ ] 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
    
    - [ ] Pull request title is okay.
    - [ ] No license issues.
    - [ ] Milestone correctly set?
    - [ ] Test coverage is ok
    - [ ] Assignees are selected.
    - [ ] Minimum number of approvals
    - [ ] No changes are requested
    
    **Be nice. Be informative.**
    
    Closes #5858 from turboFei/clean_pod.
    
    Closes #5795
    
    910e72550 [Fei Wang] fix
    
    Authored-by: Fei Wang <[email protected]>
    Signed-off-by: Fei Wang <[email protected]>
---
 .../org/apache/kyuubi/engine/KubernetesApplicationOperation.scala  | 7 ++++---
 1 file changed, 4 insertions(+), 3 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 c7c69cc16..6afe3257b 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
@@ -153,7 +153,8 @@ class KubernetesApplicationOperation extends 
ApplicationOperation with Logging {
       .build()
     expireCleanUpTriggerCacheExecutor = 
ThreadUtils.newDaemonSingleThreadScheduledExecutor(
       "pod-cleanup-trigger-thread")
-    expireCleanUpTriggerCacheExecutor.scheduleWithFixedDelay(
+    ThreadUtils.scheduleTolerableRunnableWithFixedDelay(
+      expireCleanUpTriggerCacheExecutor,
       () => {
         try {
           cleanupTerminatedAppInfoTrigger.asMap().asScala.foreach {
@@ -165,9 +166,9 @@ class KubernetesApplicationOperation extends 
ApplicationOperation with Logging {
           case NonFatal(e) => error("Failed to evict clean up terminated app 
cache", e)
         }
       },
-      5,
       cleanupDriverPodCheckInterval,
-      TimeUnit.MINUTES)
+      cleanupDriverPodCheckInterval,
+      TimeUnit.MILLISECONDS)
   }
 
   override def isSupported(appMgrInfo: ApplicationManagerInfo): Boolean = {

Reply via email to