-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-10515] When killing executor, the pending replacement executors should not be lost #8668
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
a03023d
773a11e
558cd04
5882a10
cf56d21
2722425
7e0c199
d738641
71a59a3
0041fde
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 |
|---|---|---|
|
|
@@ -303,6 +303,32 @@ class StandaloneDynamicAllocationSuite | |
| assert(master.apps.head.getExecutorLimit === 1) | ||
| } | ||
|
|
||
| test("the pending replacement executors should not be lost (SPARK-10515)") { | ||
| sc = new SparkContext(appConf) | ||
| val appId = sc.applicationId | ||
| assert(master.apps.size === 1) | ||
|
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. please update this to reflect the changes made in #8914 |
||
| assert(master.apps.head.id === appId) | ||
| assert(master.apps.head.executors.size === 2) | ||
| assert(master.apps.head.getExecutorLimit === Int.MaxValue) | ||
| // sync executors between the Master and the driver, needed because | ||
| // the driver refuses to kill executors it does not know about | ||
| syncExecutors(sc) | ||
| val executors = getExecutorIds(sc) | ||
| assert(executors.size === 2) | ||
|
|
||
| // kill executor,and replace it | ||
| assert(sc.killAndReplaceExecutor(executors.head)) | ||
|
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. Hmm... this doesn't look right. It should probably be using a new version of @andrewor14 might be a better person to comment on this, since he wrote the original tests. I'm not sure about how much we can trust the counts to update atomically when
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. yes, this might be flaky. |
||
| assert(master.apps.head.executors.size === 2) | ||
|
|
||
| assert(sc.killExecutor(executors.head)) | ||
| assert(master.apps.head.executors.size === 2) | ||
| assert(master.apps.head.getExecutorLimit === 2) | ||
|
|
||
| assert(sc.killExecutor(executors(1))) | ||
| assert(master.apps.head.executors.size === 1) | ||
| assert(master.apps.head.getExecutorLimit === 1) | ||
| } | ||
|
|
||
| // =============================== | ||
| // | Utility methods for testing | | ||
| // =============================== | ||
|
|
||
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.
do we really need another variable? Can't we just do
This makes sense on a high level too; if we replace an executor we expect to get one back, so it should be pending in the mean time.