File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ private[spark] class CoarseMesosSchedulerBackend(
63
63
// Maximum number of cores to acquire (TODO: we'll need more flexible controls here)
64
64
val maxCores = conf.get(" spark.cores.max" , Int .MaxValue .toString).toInt
65
65
66
+ val totalExpectedCores = conf.getInt(" spark.cores.max" , 0 )
67
+
66
68
// Cores we have acquired with each Mesos task ID
67
69
val coresByTaskId = new HashMap [Int , Int ]
68
70
var totalCoresAcquired = 0
@@ -333,4 +335,7 @@ private[spark] class CoarseMesosSchedulerBackend(
333
335
super .applicationId
334
336
}
335
337
338
+ override def sufficientResourcesRegistered (): Boolean = {
339
+ totalCoreCount.get() >= totalExpectedCores * minRegisteredRatio
340
+ }
336
341
}
Original file line number Diff line number Diff line change @@ -69,6 +69,11 @@ private[spark] class MesosSchedulerBackend(
69
69
val listenerBus = sc.listenerBus
70
70
71
71
@ volatile var appId : String = _
72
+
73
+ if (! sc.getConf.getOption(" spark.scheduler.minRegisteredResourcesRatio" ).isEmpty) {
74
+ logWarning(" spark.scheduler.minRegisteredResourcesRatio is set, "
75
+ + " but it will be ignored in mesos fine-grained mode." )
76
+ }
72
77
73
78
override def start () {
74
79
synchronized {
You can’t perform that action at this time.
0 commit comments