dongjoon-hyun commented on a change in pull request #33563:
URL: https://github.com/apache/spark/pull/33563#discussion_r678748611
##########
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:
Thanks. Yes, definitely, you are right. That's the reason why I added
this as `false` with a warning in the conf. It depends on the K8s API server
implementation and the cluster situations.
--
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]