dongjoon-hyun commented on code in PR #58135:
URL: https://github.com/apache/spark/pull/58135#discussion_r3823678134


##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala:
##########
@@ -221,6 +221,9 @@ class ExecutorPodsAllocator(
     // transfer the scheduler backend known executor requests from the 
newlyCreatedExecutors
     // to the schedulerKnownNewlyCreatedExecs
     val schedulerKnownExecs = 
schedulerBackend.getExecutorIds().map(_.toLong).toSet
+    schedulerKnownNewlyCreatedExecs.filterInPlace { case (k, _) =>
+      schedulerKnownExecs.contains(k)
+    }

Review Comment:
   Nit: `filterInPlace` takes a two-argument function, so this can be a 
one-liner without the `case` destructuring.
   
   ```suggestion
       schedulerKnownNewlyCreatedExecs.filterInPlace((k, _) => 
schedulerKnownExecs.contains(k))
   ```
   



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