Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zwangsheng committed Mar 29, 2023
1 parent 6d31f70 commit 78c9fdb
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class KubernetesApplicationOperation extends ApplicationOperation with Logging {
driverInformer = client.informers().sharedIndexInformerFor(
classOf[Pod],
informerPeriod)
driverInformer.addEventHandler(new DriverPodEventHandler()).start()
driverInformer.addEventHandler(new EnginePodEventHandler()).start()
info("Start Kubernetes Client Informer.")
// Using Cache help clean delete app info
val cachePeriod = conf.get(KyuubiConf.KUBERNETES_INFORMER_CACHE_PERIOD)
Expand Down Expand Up @@ -139,12 +139,12 @@ class KubernetesApplicationOperation extends ApplicationOperation with Logging {

override def stop(): Unit = {
try {
if (kubernetesClient != null) {
kubernetesClient.close()
}
if (driverInformer != null) {
driverInformer.stop()
}
if (kubernetesClient != null) {
kubernetesClient.close()
}
if (deletedAppInfoCache != null) {
deletedAppInfoCache.cleanUp()
}
Expand All @@ -153,7 +153,7 @@ class KubernetesApplicationOperation extends ApplicationOperation with Logging {
}
}

class DriverPodEventHandler extends ResourceEventHandler[Pod] {
private class EnginePodEventHandler extends ResourceEventHandler[Pod] {
private def filter(pod: Pod): Boolean = {
pod.getMetadata.getLabels.containsKey(LABEL_KYUUBI_UNIQUE_KEY)
}
Expand Down

0 comments on commit 78c9fdb

Please sign in to comment.