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

    https://github.com/apache/spark/pull/3916#discussion_r26401382
  
    --- Diff: bin/pyspark ---
    @@ -95,26 +83,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
    --- End diff --
    
    Actually `pyspark-shell` shouldn't be in PYSPARK_SUBMIT_ARGS at all. It 
probably works out of luck when you add it at the end :-), but it's handled 
internally by the launcher library.
    
    (We should probably file a bug to remove this testing stuff from 
`bin/pyspark`. That would allow other cleanups in these scripts.)


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