Skip to content

Commit

Permalink
[KYUUBI #5795][FOLLOWUP] Using correct time unit for pod cleanup exec…
Browse files Browse the repository at this point in the history
…utor

# 🔍 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 🔖

- [ ] 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 ⚰️

#### Behavior With This Pull Request 🎉

#### 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

910e725 [Fei Wang] fix

Authored-by: Fei Wang <[email protected]>
Signed-off-by: Fei Wang <[email protected]>
  • Loading branch information
turboFei committed Dec 15, 2023
1 parent 9047151 commit 487dd08
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 = {
Expand Down

0 comments on commit 487dd08

Please sign in to comment.