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


##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/KubernetesClusterManager.scala:
##########
@@ -183,6 +178,46 @@ private[spark] class KubernetesClusterManager extends 
ExternalClusterManager wit
       new SystemClock())
   }
 
+  private def makeSnapshotSources(
+      conf: SparkConf,
+      kubernetesClient: KubernetesClient,
+      snapshotsStore: ExecutorPodsSnapshotsStore,
+      applicationId: String): Seq[ExecutorPodsSnapshotSource] = {
+    val snapshotSources = conf
+      
.get(org.apache.spark.deploy.k8s.Config.KUBERNETES_EXECUTOR_POD_SNAPSHOT_SOURCES)
+      .map { className =>
+        logDebug(s"Trying to initialize executor pods snapshot source: 
$className")
+        val source = 
Utils.classForName[Any](className).getConstructor().newInstance()
+        var informerManager: InformerManager = null
+        val initializedSource = source match {
+          case s: ExecutorPodsInformerCustomSnapshotSource =>
+            if (informerManager != null) {

Review Comment:
   This null-check condition may cause the informerManager variable is always 
null when passed to s.init() ?



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