Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/1851#issuecomment-51784944
  
    @scwf Bash escaping is really annoying... Thanks for spotting and fixing 
this issue! This PR fixed the `--driver-java-options` option, but any other 
options that may accept quoted string with spaces still suffer this issue.
    
    The root cause here is that variables in these two scripts are not properly 
quoted. We should quote them to fix all similar cases. Take `bin/spark-sql` as 
an example, all `CLI_ARGS+=($1)` and `CLI_ARGS+=(\"$1\")` should be 
`CLI_ARGS+=("$1")`, and the last line
    
    ```bash
    eval exec "$FWDIR"/bin/spark-submit --class $CLASS ${SUBMISSION_ARGS[*]} 
spark-internal ${CLI_ARGS[*]}
    ```
    
    should be
    
    ```bash
    exec "$FWDIR"/bin/spark-submit --class $CLASS "${SUBMISSION_ARGS[@]}" 
spark-internal "${CLI_ARGS[@]}"
    ```
    
    The same rules applies to `sbin/start-thriftserver.sh`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to