-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29950][k8s] Blacklist deleted executors in K8S with dynamic allocation. #26586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,4 +48,13 @@ class DeterministicExecutorPodsSnapshotsStore extends ExecutorPodsSnapshotsStore | |
| currentSnapshot = ExecutorPodsSnapshot(newSnapshot) | ||
| snapshotsBuffer += currentSnapshot | ||
| } | ||
|
|
||
| def removeDeletedExecutors(): Unit = { | ||
| val nonDeleted = currentSnapshot.executorPods.filter { | ||
| case (_, PodDeleted(_)) => false | ||
| case _ => true | ||
| } | ||
| currentSnapshot = ExecutorPodsSnapshot(nonDeleted) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could call
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know it is unrelated to this change but it is strange to me that
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
As for not clearing the current snapshot, that's because snapshots are cumulative. Each update from the k8s server just adds to the previous snapshot (until a periodic full sync replaces it with replaceSnapshot). |
||
| snapshotsBuffer += currentSnapshot | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we would rather
sendFailure(_)instead of the exiting the executor with aRegisterExecutorFailedmessage?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explained in the PR description.