Github user mccheah commented on a diff in the pull request:
https://github.com/apache/spark/pull/21366#discussion_r190963140
--- Diff:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/KubernetesClusterManager.scala
---
@@ -56,17 +56,43 @@ private[spark] class KubernetesClusterManager extends
ExternalClusterManager wit
Some(new File(Config.KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH)),
Some(new File(Config.KUBERNETES_SERVICE_ACCOUNT_CA_CRT_PATH)))
- val allocatorExecutor = ThreadUtils
- .newDaemonSingleThreadScheduledExecutor("kubernetes-pod-allocator")
val requestExecutorsService = ThreadUtils.newDaemonCachedThreadPool(
"kubernetes-executor-requests")
+
+ val bufferEventsExecutor = ThreadUtils
+
.newDaemonSingleThreadScheduledExecutor("kubernetes-executor-pods-event-buffer")
+ val executeEventSubscribersExecutor = ThreadUtils
+ .newDaemonCachedThreadPool("kubernetes-executor-pods-event-handlers")
+ val eventQueue = new ExecutorPodsEventQueueImpl(
+ bufferEventsExecutor, executeEventSubscribersExecutor)
--- End diff --
Think we'd want to then have all the `start` methods take the scheduled
executor service as an argument, then the scheduler backend owns shutting them
down. But I don't think that's the right abstraction - the subcomponents own
the thread pools and know how these thread pools are being used, when tasks are
being submitted to them, etc. I think it's fine to shut down these thread pools
from the subcomponents.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]