Skip to content

Commit 70ed95a

Browse files
committed
Removed hardcoded blacklist functionality, must be controled by BlacklistTracker
1 parent 2287f3d commit 70ed95a

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
5555
with org.apache.mesos.Scheduler
5656
with MesosSchedulerUtils {
5757

58-
// Blacklist a slave after this many failures
59-
private val MAX_SLAVE_FAILURES = 2
60-
6158
private val maxCoresOption = conf.getOption("spark.cores.max").map(_.toInt)
6259

6360
// Maximum number of cores to acquire
@@ -460,7 +457,6 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
460457
cpus + totalCoresAcquired <= maxCores &&
461458
mem <= offerMem &&
462459
numExecutors() < executorLimit &&
463-
slaves.get(slaveId).map(_.taskFailures).getOrElse(0) < MAX_SLAVE_FAILURES &&
464460
meetsPortRequirements
465461
}
466462

@@ -516,15 +512,6 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
516512
totalGpusAcquired -= gpus
517513
gpusByTaskId -= taskId
518514
}
519-
// If it was a failure, mark the slave as failed for blacklisting purposes
520-
if (TaskState.isFailed(state)) {
521-
slave.taskFailures += 1
522-
523-
if (slave.taskFailures >= MAX_SLAVE_FAILURES) {
524-
logInfo(s"Blacklisting Mesos slave $slaveId due to too many failures; " +
525-
"is Spark installed on it?")
526-
}
527-
}
528515
executorTerminated(d, slaveId, taskId, s"Executor finished with state $state")
529516
// In case we'd rejected everything before but have now lost a node
530517
d.reviveOffers()
@@ -650,6 +637,5 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
650637

651638
private class Slave(val hostname: String) {
652639
val taskIDs = new mutable.HashSet[String]()
653-
var taskFailures = 0
654640
var shuffleRegistered = false
655-
}
641+
}

0 commit comments

Comments
 (0)