spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vanzin <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-4924] Add a library for launching Spark...
Date Thu, 12 Mar 2015 16:54:51 GMT
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3916#discussion_r26320982
  
    --- 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 --
    
    It depends on how the unit tests are run. Are they run through spark-submit? The you just
pass `--jars` to spark-submit.
    
    If they're run by the code under the `$SPARK_TESTING` in this file, then setting that
env variable will probably work.


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

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


Mime
View raw message