littlexyw commented on code in PR #51396:
URL: https://github.com/apache/spark/pull/51396#discussion_r2447989621


##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/KubernetesClusterManager.scala:
##########
@@ -136,15 +136,11 @@ private[spark] class KubernetesClusterManager extends 
ExternalClusterManager wit
 
     val executorPodsAllocator = makeExecutorPodsAllocator(sc, 
kubernetesClient, snapshotsStore)
 
-    val podsWatchEventSource = new ExecutorPodsWatchSnapshotSource(
-      snapshotsStore,
-      kubernetesClient,
-      sc.conf)
-
-    val eventsPollingExecutor = 
ThreadUtils.newDaemonSingleThreadScheduledExecutor(
-      "kubernetes-executor-pod-polling-sync")
-    val podsPollingEventSource = new ExecutorPodsPollingSnapshotSource(
-      sc.conf, kubernetesClient, snapshotsStore, eventsPollingExecutor)
+    val snapshotSources = {
+      val sources = makeSnapshotSources(sc.conf, kubernetesClient, 
snapshotsStore, sc.applicationId)

Review Comment:
   Here, _application in sc has not been initialized yet, so sc.application is 
null. As a result, the informer will watch the pods of all apps in the 
namespace.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to