Skip to content

Commit 1a042ff

Browse files
committed
Change some code style.
1 parent 2dc456e commit 1a042ff

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

core/src/main/scala/org/apache/spark/SparkContext.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)