Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2509#discussion_r18126747
  
    --- Diff: sbin/spark-daemon.sh ---
    @@ -142,8 +142,12 @@ case $startStop in
     
         spark_rotate_log "$log"
         echo starting $command, logging to $log
    -    cd "$SPARK_PREFIX"
    -    nohup nice -n $SPARK_NICENESS "$SPARK_PREFIX"/bin/spark-class $command 
"$@" >> "$log" 2>&1 < /dev/null &
    +    if [ $option == spark-submit ]; then
    +      nohup nice -n $SPARK_NICENESS "$SPARK_PREFIX"/bin/spark-submit 
--class $command \
    --- End diff --
    
    Hm, that's fair. I'd use `export` in `sbin/start-thriftserver.sh` to fix 
this issue (exported environment variables are accessible in bash subprocesses):
    
    ```bash
    export SUBMIT_USAGE_FUNCTION=usage
    exec "$FWDIR"/sbin/spark-daemon.sh spark-submit $CLASS 1
    ```


---
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