diff options
author | wangfei <wangfei_hello@126.com> | 2014-08-14 10:55:51 -0700 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-08-14 10:55:51 -0700 |
commit | 267fdffe2743bc2dc706c8ac8af0ae33a358a5d3 (patch) | |
tree | 641e746dbd4adfbd96f68e04522d5dc611616a7a /bin/spark-sql | |
parent | fde692b361773110c262abe219e7c8128bd76419 (diff) | |
download | spark-267fdffe2743bc2dc706c8ac8af0ae33a358a5d3.tar.gz spark-267fdffe2743bc2dc706c8ac8af0ae33a358a5d3.tar.bz2 spark-267fdffe2743bc2dc706c8ac8af0ae33a358a5d3.zip |
[SPARK-2925] [sql]fix spark-sql and start-thriftserver shell bugs when set --driver-java-options
https://issues.apache.org/jira/browse/SPARK-2925
Run cmd like this will get the error
bin/spark-sql --driver-java-options '-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8788,server=y,suspend=y'
Error: Unrecognized option '-Xnoagent'.
Run with --help for usage help or --verbose for debug output
Author: wangfei <wangfei_hello@126.com>
Author: wangfei <wangfei1@huawei.com>
Closes #1851 from scwf/patch-2 and squashes the following commits:
516554d [wangfei] quote variables to fix this issue
8bd40f2 [wangfei] quote variables to fix this problem
e6d79e3 [wangfei] fix start-thriftserver bug when set driver-java-options
948395d [wangfei] fix spark-sql error when set --driver-java-options
Diffstat (limited to 'bin/spark-sql')
-rwxr-xr-x | bin/spark-sql | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/spark-sql b/bin/spark-sql index 7813ccc361..564f1f4190 100755 --- a/bin/spark-sql +++ b/bin/spark-sql @@ -65,30 +65,30 @@ while (($#)); do case $1 in -d | --define | --database | -f | -h | --hiveconf | --hivevar | -i | -p) ensure_arg_number $# 2 - CLI_ARGS+=($1); shift - CLI_ARGS+=($1); shift + CLI_ARGS+=("$1"); shift + CLI_ARGS+=("$1"); shift ;; -e) ensure_arg_number $# 2 - CLI_ARGS+=($1); shift - CLI_ARGS+=(\"$1\"); shift + CLI_ARGS+=("$1"); shift + CLI_ARGS+=("$1"); shift ;; -s | --silent) - CLI_ARGS+=($1); shift + CLI_ARGS+=("$1"); shift ;; -v | --verbose) # Both SparkSubmit and SparkSQLCLIDriver recognizes -v | --verbose - CLI_ARGS+=($1) - SUBMISSION_ARGS+=($1); shift + CLI_ARGS+=("$1") + SUBMISSION_ARGS+=("$1"); shift ;; *) - SUBMISSION_ARGS+=($1); shift + SUBMISSION_ARGS+=("$1"); shift ;; esac done -eval exec "$FWDIR"/bin/spark-submit --class $CLASS ${SUBMISSION_ARGS[*]} spark-internal ${CLI_ARGS[*]} +exec "$FWDIR"/bin/spark-submit --class $CLASS "${SUBMISSION_ARGS[@]}" spark-internal "${CLI_ARGS[@]}" |