Uh oh!
There was an error while loading. Please reload this page.
[SPARK-41525][K8S] Improve onNewSnapshots to use unique lists of known executor IDs and PVC names - #39070
Closed
dongjoon-hyun wants to merge 1 commit into
Closed
[SPARK-41525][K8S] Improve onNewSnapshots to use unique lists of known executor IDs and PVC names#39070dongjoon-hyun wants to merge 1 commit into
onNewSnapshots to use unique lists of known executor IDs and PVC names#39070dongjoon-hyun wants to merge 1 commit into
Conversation
…s in onNewSnapshots
onNewSnapshotsonNewSnapshotsonNewSnapshots to use unique list of known executor IDs and PVC namesdongjoon-hyun
commented
Dec 15, 2022
MemberAuthor
cc @viirya and @attilapiros |
onNewSnapshots to use unique list of known executor IDs and PVC namesonNewSnapshots to use unique list of known executor IDs and PVC namesonNewSnapshots to use unique list of known executor IDs and PVC namesonNewSnapshots to use unique lists of known executor IDs and PVC names| schedulerBackend: KubernetesClusterSchedulerBackend, | ||
| snapshots: Seq[ExecutorPodsSnapshot]): Unit = { | ||
| val k8sKnownExecIds = snapshots.flatMap(_.executorPods.keys) | ||
| val k8sKnownExecIds = snapshots.flatMap(_.executorPods.keys).distinct |
MemberAuthor
There was a problem hiding this comment.
The original code is in Spark 3.1.2 and Spark 3.2.0.
Member
There was a problem hiding this comment.
So snapshots may contain duplicates too?
MemberAuthor
There was a problem hiding this comment.
snapshots is defined as a sequence of snapshot history originally. Logically, there can be a few snapshot which the same contents, but in the most cases, they will be different by object metadata or status.
| pod.getSpec.getVolumes.asScala | ||
| .flatMap { v => Option(v.getPersistentVolumeClaim).map(_.getClaimName) } | ||
| } | ||
| }.distinct |
MemberAuthor
There was a problem hiding this comment.
This is since Spark 3.2.0.
viirya
approved these changes
Dec 15, 2022
dongjoon-hyun
commented
Dec 15, 2022
MemberAuthor
Thank you, @viirya ! |
dongjoon-hyun
commented
Dec 15, 2022
MemberAuthor
All tests passed except the master branch dependency test failure. Merged to master. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR improve
ExecutorPodsAllocator.onNewSnapshotsby removing duplications atk8sKnownExecIdsandk8sKnownPVCNames. In the large cluster, this causes inefficiency.Why are the changes needed?
The existing variables have lots of duplications because
snapshotsisSeq[ExecutorPodsSnapshot].For example, if we print out the values, it looks like the following.
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.