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

    https://github.com/apache/spark/pull/3916#discussion_r25400811
  
    --- Diff: bin/pyspark ---
    @@ -95,26 +80,13 @@ export 
PYTHONPATH="$SPARK_HOME/python/lib/py4j-0.8.2.1-src.zip:$PYTHONPATH"
     
     # Load the PySpark shell.py script when ./pyspark is used interactively:
     export OLD_PYTHONSTARTUP="$PYTHONSTARTUP"
    -export PYTHONSTARTUP="$FWDIR/python/pyspark/shell.py"
    -
    -# Build up arguments list manually to preserve quotes and backslashes.
    -# We export Spark submit arguments as an environment variable because 
shell.py must run as a
    -# PYTHONSTARTUP script, which does not take in arguments. This is required 
for IPython notebooks.
    -SUBMIT_USAGE_FUNCTION=usage
    -gatherSparkSubmitOpts "$@"
    -PYSPARK_SUBMIT_ARGS=""
    -whitespace="[[:space:]]"
    -for i in "${SUBMISSION_OPTS[@]}"; do
    -  if [[ $i =~ \" ]]; then i=$(echo $i | sed 's/\"/\\\"/g'); fi
    -  if [[ $i =~ $whitespace ]]; then i=\"$i\"; fi
    -  PYSPARK_SUBMIT_ARGS="$PYSPARK_SUBMIT_ARGS $i"
    -done
    -export PYSPARK_SUBMIT_ARGS
    +export PYTHONSTARTUP="$SPARK_HOME/python/pyspark/shell.py"
     
     # For pyspark tests
     if [[ -n "$SPARK_TESTING" ]]; then
       unset YARN_CONF_DIR
       unset HADOOP_CONF_DIR
    +  export PYSPARK_SUBMIT_ARGS=pyspark-shell
    --- End diff --
    
    why do we need to do this? Don't we just overwrite this in 
`SparkSubmitCommandBuilder` anyway?


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