Skip to content

Commit

Permalink
Add the some error infomation if using spark-sql in yarn-cluster mode
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintBacchus committed Nov 26, 2014
1 parent 7bcecc2 commit ec957bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ object SparkSubmit {
printErrorAndExit("Cluster deploy mode is currently not supported for python applications.")
case (_, CLUSTER) if isShell(args.primaryResource) =>
printErrorAndExit("Cluster deploy mode is not applicable to Spark shells.")
case (_, CLUSTER) if isSql(args.mainClass) =>
printErrorAndExit("Cluster deploy mode is not applicable to Spark SQLs.")
case (_, CLUSTER) if isSqlShell(args.mainClass) =>
printErrorAndExit("Cluster deploy mode is not applicable to Spark Sql shells.")
case _ =>
}

Expand Down Expand Up @@ -393,7 +393,7 @@ object SparkSubmit {
/**
* Return whether the given main class represents a sql shell.
*/
private[spark] def isSql(mainClass: String): Boolean = {
private[spark] def isSqlShell(mainClass: String): Boolean = {
mainClass == "org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver"
}

Expand Down

0 comments on commit ec957bc

Please sign in to comment.