You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2014/08/14 19:55:59 UTC
git commit: [SPARK-2925] [sql]fix spark-sql and start-thriftserver
shell bugs when set --driver-java-options
Repository: spark
Updated Branches:
refs/heads/master fde692b36 -> 267fdffe2
[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 <wa...@126.com>
Author: wangfei <wa...@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
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/267fdffe
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/267fdffe
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/267fdffe
Branch: refs/heads/master
Commit: 267fdffe2743bc2dc706c8ac8af0ae33a358a5d3
Parents: fde692b
Author: wangfei <wa...@126.com>
Authored: Thu Aug 14 10:55:51 2014 -0700
Committer: Michael Armbrust <mi...@databricks.com>
Committed: Thu Aug 14 10:55:51 2014 -0700
----------------------------------------------------------------------
bin/spark-sql | 18 +++++++++---------
sbin/start-thriftserver.sh | 8 ++++----
2 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/267fdffe/bin/spark-sql
----------------------------------------------------------------------
diff --git a/bin/spark-sql b/bin/spark-sql
index 7813ccc..564f1f4 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[@]}"
http://git-wip-us.apache.org/repos/asf/spark/blob/267fdffe/sbin/start-thriftserver.sh
----------------------------------------------------------------------
diff --git a/sbin/start-thriftserver.sh b/sbin/start-thriftserver.sh
index 603f50a..2c44524 100755
--- a/sbin/start-thriftserver.sh
+++ b/sbin/start-thriftserver.sh
@@ -65,14 +65,14 @@ while (($#)); do
case $1 in
--hiveconf)
ensure_arg_number $# 2
- THRIFT_SERVER_ARGS+=($1); shift
- THRIFT_SERVER_ARGS+=($1); shift
+ THRIFT_SERVER_ARGS+=("$1"); shift
+ THRIFT_SERVER_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 ${THRIFT_SERVER_ARGS[*]}
+exec "$FWDIR"/bin/spark-submit --class $CLASS "${SUBMISSION_ARGS[@]}" spark-internal "${THRIFT_SERVER_ARGS[@]}"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org