dongjoon-hyun commented on a change in pull request #33563:
URL: https://github.com/apache/spark/pull/33563#discussion_r678754719



##########
File path: 
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsPollingSnapshotSource.scala
##########
@@ -55,14 +56,17 @@ private[spark] class ExecutorPodsPollingSnapshotSource(
   private class PollRunnable(applicationId: String) extends Runnable {
     override def run(): Unit = Utils.tryLogNonFatalError {
       logDebug(s"Resynchronizing full executor pod state from Kubernetes.")
-      snapshotsStore.replaceSnapshot(kubernetesClient
+      val pods = kubernetesClient
         .pods()
         .withLabel(SPARK_APP_ID_LABEL, applicationId)
         .withLabel(SPARK_ROLE_LABEL, SPARK_POD_EXECUTOR_ROLE)
         .withoutLabel(SPARK_EXECUTOR_INACTIVE_LABEL, "true")
-        .list()
-        .getItems
-        .asScala.toSeq)
+      val list = if 
(conf.get(KUBERNETES_EXECUTOR_API_POLLING_WITH_RESOURCE_VERSION)) {
+        pods.list(new ListOptionsBuilder().withResourceVersion("0").build())
+      } else {
+        pods.list()
+      }
+      snapshotsStore.replaceSnapshot(list.getItems.asScala.toSeq)

Review comment:
       I'm taking back my words. I'll revise this PR, ASAP.




-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to