Repository: spark Updated Branches: refs/heads/master c80194b33 -> 1ca0a1014
[SPARK-5176] The thrift server does not support cluster mode Output an error message if the thrift server is started in cluster mode. Author: Tom Panning <[email protected]> Closes #4137 from tpanningnextcen/spark-5176-thrift-cluster-mode-error and squashes the following commits: f5c0509 [Tom Panning] [SPARK-5176] The thrift server does not support cluster mode Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/1ca0a101 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/1ca0a101 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/1ca0a101 Branch: refs/heads/master Commit: 1ca0a1014e3782dd0045d6e403992ac5114486ad Parents: c80194b Author: Tom Panning <[email protected]> Authored: Sun Feb 1 17:57:31 2015 -0800 Committer: Andrew Or <[email protected]> Committed: Sun Feb 1 17:57:31 2015 -0800 ---------------------------------------------------------------------- .../main/scala/org/apache/spark/deploy/SparkSubmit.scala | 9 +++++++++ sbin/start-thriftserver.sh | 2 ++ 2 files changed, 11 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/1ca0a101/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala ---------------------------------------------------------------------- diff --git a/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala b/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala index 050ba91..c240bcd 100644 --- a/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala +++ b/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala @@ -144,6 +144,8 @@ object SparkSubmit { printErrorAndExit("Cluster deploy mode is not applicable to Spark shells.") case (_, CLUSTER) if isSqlShell(args.mainClass) => printErrorAndExit("Cluster deploy mode is not applicable to Spark SQL shell.") + case (_, CLUSTER) if isThriftServer(args.mainClass) => + printErrorAndExit("Cluster deploy mode is not applicable to Spark Thrift server.") case _ => } @@ -409,6 +411,13 @@ object SparkSubmit { } /** + * Return whether the given main class represents a thrift server. + */ + private[spark] def isThriftServer(mainClass: String): Boolean = { + mainClass == "org.apache.spark.sql.hive.thriftserver.HiveThriftServer2" + } + + /** * Return whether the given primary resource requires running python. */ private[spark] def isPython(primaryResource: String): Boolean = { http://git-wip-us.apache.org/repos/asf/spark/blob/1ca0a101/sbin/start-thriftserver.sh ---------------------------------------------------------------------- diff --git a/sbin/start-thriftserver.sh b/sbin/start-thriftserver.sh index 50e8e06..070cc7a 100755 --- a/sbin/start-thriftserver.sh +++ b/sbin/start-thriftserver.sh @@ -26,6 +26,8 @@ set -o posix # Figure out where Spark is installed FWDIR="$(cd "`dirname "$0"`"/..; pwd)" +# NOTE: This exact class name is matched downstream by SparkSubmit. +# Any changes need to be reflected there. CLASS="org.apache.spark.sql.hive.thriftserver.HiveThriftServer2" function usage { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
