You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/02/09 08:36:04 UTC

[GitHub] [spark] jaceklaskowski commented on a change in pull request #31513: [SPARK-34361][K8S] In case of downscaling avoid killing of executors already known by the scheduler backend in the pod allocator

jaceklaskowski commented on a change in pull request #31513:
URL: https://github.com/apache/spark/pull/31513#discussion_r572216226



##########
File path: resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala
##########
@@ -114,8 +114,12 @@ private[spark] class ExecutorPodsAllocator(
 
   private def onNewSnapshots(
       applicationId: String,
+      schedulerBackend: KubernetesClusterSchedulerBackend,
       snapshots: Seq[ExecutorPodsSnapshot]): Unit = {
+    val schedulerKnownExecs = schedulerBackend.getExecutorIds().map(_.toLong).toSet
     newlyCreatedExecutors --= snapshots.flatMap(_.executorPods.keys)
+    val schedulerKnowNewlyCreatedExecs = newlyCreatedExecutors.keySet.intersect(schedulerKnownExecs)

Review comment:
       nit: a typo in `Know`




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

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



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