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

    https://github.com/apache/spark/pull/2444#discussion_r18016579
  
    --- Diff: sbin/slaves.sh ---
    @@ -67,23 +69,34 @@ fi
     
     if [ "$HOSTLIST" = "" ]; then
       if [ "$SPARK_SLAVES" = "" ]; then
    -    export HOSTLIST="${SPARK_CONF_DIR}/slaves"
    +    if [ -f "${SPARK_CONF_DIR}/slaves" ]; then
    +      HOSTLIST=`cat "${SPARK_CONF_DIR}/slaves"`
    +    else
    +      HOSTLIST=localhost
    +    fi
       else
    -    export HOSTLIST="${SPARK_SLAVES}"
    +    HOSTLIST=`cat "${SPARK_SLAVES}"`
       fi
     fi
     
    +
    +
     # By default disable strict host key checking
     if [ "$SPARK_SSH_OPTS" = "" ]; then
       SPARK_SSH_OPTS="-o StrictHostKeyChecking=no"
     fi
     
    -for slave in `cat "$HOSTLIST"|sed  "s/#.*$//;/^$/d"`; do
    - ssh $SPARK_SSH_OPTS "$slave" $"${@// /\\ }" \
    -   2>&1 | sed "s/^/$slave: /" &
    - if [ "$SPARK_SLAVE_SLEEP" != "" ]; then
    -   sleep $SPARK_SLAVE_SLEEP
    - fi
    +for slave in `echo "$HOSTLIST"|sed  "s/#.*$//;/^$/d"`; do
    +  if [ "${SPARK_SSH_FOREGROUND}" = "y" ] || [ "${SPARK_SSH_FOREGROUND}" = 
"yes" ]; then
    --- End diff --
    
    Typically for these types of options we just check whether it's defined or 
not. For example elsewhere we do:
    
    ```
    if [ -n "$SPARK_PRINT_LAUNCH_COMMAND" ]; then
    ```
    
    Can you make it consistent with that?


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