aboutsummaryrefslogtreecommitdiff
path: root/sbin/start-thriftserver.sh
diff options
context:
space:
mode:
authorWangTaoTheTonic <barneystinson@aliyun.com>2014-10-01 15:15:09 -0700
committerMichael Armbrust <michael@databricks.com>2014-10-01 15:15:24 -0700
commitd61f2c15bb22253bfdda77462b1bd383987d2f5a (patch)
treea1e90441252ab3d670e76b5139d020837d18f33a /sbin/start-thriftserver.sh
parentfcad3fae6135bc2c9bdaf9e4c3cfe24838e63eae (diff)
downloadspark-d61f2c15bb22253bfdda77462b1bd383987d2f5a.tar.gz
spark-d61f2c15bb22253bfdda77462b1bd383987d2f5a.tar.bz2
spark-d61f2c15bb22253bfdda77462b1bd383987d2f5a.zip
[SPARK-3658][SQL] Start thrift server as a daemon
https://issues.apache.org/jira/browse/SPARK-3658 And keep the `CLASS_NOT_FOUND_EXIT_STATUS` and exit message in `SparkSubmit.scala`. Author: WangTaoTheTonic <barneystinson@aliyun.com> Author: WangTao <barneystinson@aliyun.com> Closes #2509 from WangTaoTheTonic/thriftserver and squashes the following commits: 5dcaab2 [WangTaoTheTonic] issue about coupling 8ad9f95 [WangTaoTheTonic] generalization 598e21e [WangTao] take thrift server as a daemon
Diffstat (limited to 'sbin/start-thriftserver.sh')
-rwxr-xr-xsbin/start-thriftserver.sh16
1 files changed, 2 insertions, 14 deletions
diff --git a/sbin/start-thriftserver.sh b/sbin/start-thriftserver.sh
index ba953e763f..50e8e06418 100755
--- a/sbin/start-thriftserver.sh
+++ b/sbin/start-thriftserver.sh
@@ -27,7 +27,6 @@ set -o posix
FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
CLASS="org.apache.spark.sql.hive.thriftserver.HiveThriftServer2"
-CLASS_NOT_FOUND_EXIT_STATUS=101
function usage {
echo "Usage: ./sbin/start-thriftserver [options] [thrift server options]"
@@ -49,17 +48,6 @@ if [[ "$@" = *--help ]] || [[ "$@" = *-h ]]; then
exit 0
fi
-source "$FWDIR"/bin/utils.sh
-SUBMIT_USAGE_FUNCTION=usage
-gatherSparkSubmitOpts "$@"
+export SUBMIT_USAGE_FUNCTION=usage
-"$FWDIR"/bin/spark-submit --class $CLASS "${SUBMISSION_OPTS[@]}" spark-internal "${APPLICATION_OPTS[@]}"
-exit_status=$?
-
-if [[ exit_status -eq CLASS_NOT_FOUND_EXIT_STATUS ]]; then
- echo
- echo "Failed to load Hive Thrift server main class $CLASS."
- echo "You need to build Spark with -Phive."
-fi
-
-exit $exit_status
+exec "$FWDIR"/sbin/spark-daemon.sh spark-submit $CLASS 1 "$@"