@@ -379,7 +379,7 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
379379 private val dynamicAllocationTesting = conf.getBoolean(" spark.dynamicAllocation.testing" , false )
380380 private [spark] val executorAllocationManager : Option [ExecutorAllocationManager ] =
381381 if (dynamicAllocationEnabled) {
382- assert(supportKillExecutor ,
382+ assert(supportDynamicAllocation ,
383383 " Dynamic allocation of executors is currently only supported in YARN mode" )
384384 Some (new ExecutorAllocationManager (this , listenerBus, conf))
385385 } else {
@@ -1058,7 +1058,8 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
10581058 */
10591059 @ DeveloperApi
10601060 override def requestExecutors (numAdditionalExecutors : Int ): Boolean = {
1061- assert(supportKillExecutor, " Requesting executors is currently only supported in YARN mode" )
1061+ assert(supportDynamicAllocation,
1062+ " Requesting executors is currently only supported in YARN mode" )
10621063 schedulerBackend match {
10631064 case b : CoarseGrainedSchedulerBackend =>
10641065 b.requestExecutors(numAdditionalExecutors)
@@ -1075,7 +1076,8 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
10751076 */
10761077 @ DeveloperApi
10771078 override def killExecutors (executorIds : Seq [String ]): Boolean = {
1078- assert(supportKillExecutor, " Killing executors is currently only supported in YARN mode" )
1079+ assert(supportDynamicAllocation,
1080+ " Killing executors is currently only supported in YARN mode" )
10791081 schedulerBackend match {
10801082 case b : CoarseGrainedSchedulerBackend =>
10811083 b.killExecutors(executorIds)
0 commit comments