dongjoon-hyun opened a new pull request, #39070:
URL: https://github.com/apache/spark/pull/39070

   ### What changes were proposed in this pull request?
   
   This PR improve `ExecutorPodsAllocator.onNewSnapshots` by removing 
duplications at `k8sKnownExecIds` and `k8sKnownPVCNames`.
   
   ### Why are the changes needed?
   
   The existing variables have lots of duplications because `snapshots` is 
`Seq[ExecutorPodsSnapshot]`.
   ```
   val k8sKnownExecIds = snapshots.flatMap(_.executorPods.keys)
   ```
   
   For example, if we print out the values, it looks like the following.
   ```
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 1
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 2
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 1
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 2
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 1
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 2
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 1
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 2
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 1
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 2
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 1
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 2
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 3
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 1
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 2
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 3
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 1
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 2
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 3
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 1
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 2
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 3
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 1
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 2
   22/12/15 07:09:37 INFO ExecutorPodsAllocator: 3
   ```
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Manual review because this is an improvement on the local variable 
computation.
   


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