-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-19755][Mesos] Blacklist is always active for MesosCoarseGrainedSchedulerBackend #20640
Closed
IgorBerman
wants to merge
14
commits into
apache:master
from
IgorBerman:SPARK-19755-Blacklist-is-always-active-for-MesosCoarseGrainedSchedulerBackend
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
636959a
Removed hardcoded blacklist functionality, must be controled by Black…
antiout f09faf7
Removed hardcoded blacklist functionality, must be controled by Black…
antiout e2ddc1b
SPARK-19755 declining offers from blacklisted slave by BlacklistTracker
IgorBerman 66ed5af
[SPARK-19755][Mesos] reverting logging on mesos slave task(executor) …
IgorBerman a7ff8cc
[SPARK-19755][Mesos] rewording log message and changing it to error l…
IgorBerman 2c47271
[SPARK-19755][Mesos] adding comment regarding failures of mesos task …
IgorBerman 5eda874
[SPARK-19755][Mesos] specifying that it's mesos task failing
IgorBerman 104d44f
Merge branch 'master' into SPARK-19755-Blacklist-is-always-active-for…
IgorBerman 95ca22c
SPARK-19755 fixing merge
IgorBerman cb8cb57
SPARK-19755 adding jira to testcase name
IgorBerman 83cabff
SPARK-19755 removing duplicated line
IgorBerman 2fc0288
alternative
dongjoon-hyun 04f931d
Recover comments
dongjoon-hyun dbe7d18
Merge pull request #1 from dongjoon-hyun/PR-20640-2
IgorBerman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ import org.apache.spark.internal.config._ | |
import org.apache.spark.network.shuffle.mesos.MesosExternalBlockStoreClient | ||
import org.apache.spark.rpc.{RpcAddress, RpcEndpointRef} | ||
import org.apache.spark.scheduler.TaskSchedulerImpl | ||
import org.apache.spark.scheduler.cluster.CoarseGrainedClusterMessages.{RegisterExecutor} | ||
import org.apache.spark.scheduler.cluster.CoarseGrainedClusterMessages.RegisterExecutor | ||
import org.apache.spark.scheduler.cluster.mesos.Utils._ | ||
|
||
class MesosCoarseGrainedSchedulerBackendSuite extends SparkFunSuite | ||
|
@@ -107,6 +107,28 @@ class MesosCoarseGrainedSchedulerBackendSuite extends SparkFunSuite | |
verifyTaskLaunched(driver, "o2") | ||
} | ||
|
||
test("SPARK-19755 mesos declines offers from blacklisted slave") { | ||
setBackend() | ||
|
||
// launches a task on a valid offer on slave s1 | ||
val minMem = backend.executorMemory(sc) + 1024 | ||
val minCpu = 4 | ||
val offer1 = Resources(minMem, minCpu) | ||
offerResources(List(offer1)) | ||
verifyTaskLaunched(driver, "o1") | ||
|
||
// for any reason executor(aka mesos task) failed on s1 | ||
val status = createTaskStatus("0", "s1", TaskState.TASK_FAILED) | ||
backend.statusUpdate(driver, status) | ||
when(taskScheduler.nodeBlacklist()).thenReturn(Set("hosts1")) | ||
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. just to re-iterate my point above -- in many cases, having an executor fail will not lead to |
||
|
||
val offer2 = Resources(minMem, minCpu) | ||
// Offer resources from the same slave | ||
offerResources(List(offer2)) | ||
// but since it's blacklisted the offer is declined | ||
verifyDeclinedOffer(driver, createOfferId("o1"), true) | ||
} | ||
|
||
test("mesos supports spark.executor.cores") { | ||
val executorCores = 4 | ||
setBackend(Map(EXECUTOR_CORES.key -> executorCores.toString)) | ||
|
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.
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 it a concern to lose this error message? (I don't know anything about Mesos but it does seem potentially useful?)
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.
@kayousterhout BlacklistTracker has it's own logging that is concerned with blacklisted nodes, won't it be enough? on the other hand, if blacklisting is disabled, which is default, then we will lose this information.
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.
@IgorBerman Yes, in the default case, it would be nice to have this information about a task failing, especially if it fails repeatedly.