-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-13001] [CORE] [MESOS] Prevent getting offers when reached max cores #10924
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
9b314e0
5ef4879
31b2aba
ad2f014
55732fa
0ccd71c
112f136
5b55ae0
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 |
|---|---|---|
|
|
@@ -147,6 +147,19 @@ class CoarseMesosSchedulerBackendSuite extends SparkFunSuite | |
| verifyDeclinedOffer(driver, createOfferId("o1"), true) | ||
| } | ||
|
|
||
| test("mesos declines offers with a filter when reached spark.cores.max") { | ||
| val maxCores = 3 | ||
| setBackend(Map("spark.cores.max" -> maxCores.toString)) | ||
|
|
||
| val executorMemory = backend.executorMemory(sc) | ||
| offerResources(List( | ||
| (executorMemory, maxCores + 1), | ||
| (executorMemory, maxCores + 1))) | ||
|
|
||
| verifyTaskLaunched("o1") | ||
| verifyDeclinedOffer(driver, createOfferId("o2"), true) | ||
|
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. This doesn't test the new config var. This would have passed before the addition of this feature.
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. It would have failed because the declined offer wouldn't have been passed a filter. It would have passed with 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. Ah, then can you change the test description to "mesos declines offers with a filter" |
||
| } | ||
|
|
||
| test("mesos assigns tasks round-robin on offers") { | ||
| val executorCores = 4 | ||
| val maxCores = executorCores * 2 | ||
|
|
||
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.
style: