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

    https://github.com/apache/spark/pull/3823#discussion_r22307986
  
    --- Diff: bin/spark-submit ---
    @@ -42,7 +42,10 @@ while (($#)); do
       shift
     done
     
    -DEFAULT_PROPERTIES_FILE="$SPARK_HOME/conf/spark-defaults.conf"
    +DEFAULT_PROPERTIES_FILE="$SPARK_CONF_DIR/spark-defaults.conf"
    +if [ ! -f "DEFAULT_PROPERTIES_FILE" ]; then
    +  DEFAULT_PROPERTIES_FILE="$SPARK_HOME/conf/spark-defaults.conf"
    +fi
     export SPARK_SUBMIT_DEPLOY_MODE=${SPARK_SUBMIT_DEPLOY_MODE:-"client"}
     export 
SPARK_SUBMIT_PROPERTIES_FILE=${SPARK_SUBMIT_PROPERTIES_FILE:-"$DEFAULT_PROPERTIES_FILE"}
    --- End diff --
    
    If user didn't pass `--properties-file` and define SPARK_CONF_DIR while not 
SPARK_HOME, then spark-submit will see if `spark.driver.extra*` in directory 
specified by `DEFAULT_PROPERTIES_FILE="$SPARK_HOME/conf/spark-defaults.conf"`. 
Obviously it will make the wrong judgement when SPARK_CONF_DIR does not equal 
`$SPARK_HOME/conf`.


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