File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
resource-managers/kubernetes/core/src/main/scala/org/apache/spark Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1616 */
1717package org .apache .spark .deploy .k8s
1818
19- import org .apache .spark .SPARK_VERSION
2019import org .apache .spark .internal .Logging
2120import org .apache .spark .internal .config .ConfigBuilder
2221import org .apache .spark .network .util .ByteUnit
@@ -36,7 +35,7 @@ private[spark] object Config extends Logging {
3635 .doc(" Docker image to use for the executors. Specify this using the standard Docker tag" +
3736 " format." )
3837 .stringConf
39- .createWithDefault( s " spark-executor: $SPARK_VERSION " )
38+ .createOptional
4039
4140 val DOCKER_IMAGE_PULL_POLICY =
4241 ConfigBuilder (" spark.kubernetes.docker.image.pullPolicy" )
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ import scala.collection.JavaConverters._
2020
2121import io .fabric8 .kubernetes .api .model ._
2222
23- import org .apache .spark .SparkConf
23+ import org .apache .spark .{ SparkConf , SparkException }
2424import org .apache .spark .deploy .k8s .Config ._
2525import org .apache .spark .deploy .k8s .ConfigurationUtils
2626import org .apache .spark .deploy .k8s .Constants ._
@@ -72,7 +72,9 @@ private[spark] class ExecutorPodFactoryImpl(sparkConf: SparkConf)
7272 sparkConf,
7373 KUBERNETES_NODE_SELECTOR_PREFIX )
7474
75- private val executorDockerImage = sparkConf.get(EXECUTOR_DOCKER_IMAGE )
75+ private val executorDockerImage = sparkConf
76+ .get(EXECUTOR_DOCKER_IMAGE )
77+ .getOrElse(throw new SparkException (" Must specify the executor Docker image" ))
7678 private val dockerImagePullPolicy = sparkConf.get(DOCKER_IMAGE_PULL_POLICY )
7779 private val blockManagerPort = sparkConf
7880 .getInt(" spark.blockmanager.port" , DEFAULT_BLOCKMANAGER_PORT )
You can’t perform that action at this time.
0 commit comments