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

    https://github.com/apache/spark/pull/2509#discussion_r18122728
  
    --- 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 --
    
    We need to call `gatherSparkSubmitOpts "$@"` before this line to generate 
`SUBMISSION_OPTS` and `APPLICATION_OPTS`. I don't think we should source 
`spark-daemon.sh` in `start-thriftserver.sh` because
    
    1. `gatherSparkSubmitOpts` is tightly coupled with `spark-submit`. In fact 
we should always call `gatherSparkSubmitOpts` before calling `spark-submit`. 
Put them together is more preferable.
    2. When adding another daemon component that uses `spark-submit` in the 
future, we don't want to duplicate the `gatherSparkSubmitOpts` call in the new 
start script.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to