diff --git a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala index 02f4064afc6..afc96fb5ea0 100644 --- a/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala +++ b/kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala @@ -108,9 +108,9 @@ class SparkProcessBuilder( } override protected val engineScalaBinaryVersion: String = { - val sparkCoreScalaVersion = + env.get("SPARK_SCALA_VERSION").filter(StringUtils.isNotBlank).getOrElse { extractSparkCoreScalaVersion(Paths.get(sparkHome, "jars").toFile.list()) - StringUtils.defaultIfBlank(System.getenv("SPARK_SCALA_VERSION"), sparkCoreScalaVersion) + } } override protected lazy val engineHomeDirFilter: FileFilter = file => {