File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
core/src/main/scala/org/apache/spark/deploy Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,8 @@ object SparkSubmit {
142142 printErrorAndExit(" Cluster deploy mode is currently not supported for python applications." )
143143 case (_, CLUSTER ) if isShell(args.primaryResource) =>
144144 printErrorAndExit(" Cluster deploy mode is not applicable to Spark shells." )
145+ case (_, CLUSTER ) if isSql(args.mainClass) =>
146+ printErrorAndExit(" Cluster deploy mode is not applicable to Spark SQLs." )
145147 case _ =>
146148 }
147149
@@ -388,6 +390,13 @@ object SparkSubmit {
388390 primaryResource == SPARK_SHELL || primaryResource == PYSPARK_SHELL
389391 }
390392
393+ /**
394+ * Return whether the given main class represents a sql shell.
395+ */
396+ private [spark] def isSql (mainClass : String ): Boolean = {
397+ mainClass == " org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver"
398+ }
399+
391400 /**
392401 * Return whether the given primary resource requires running python.
393402 */
You can’t perform that action at this time.
0 commit comments