GitHub user BryanCutler opened a pull request:
https://github.com/apache/spark/pull/15019
[SPARK-17387][PYSPARK] Allow passing of args to gateway to configure JVM
## What changes were proposed in this pull request?
When not using spark-submit, user configuration for the JVM is ignored when
creating the SparkContext. This is because the JVM is started before the
SparkConf object is initialized. This change allows user to specify --conf
args on the command line that will be used when launching the java gateway to
configure the JVM.
## How was this patch tested?
Started a plain Python shell with this command and verified the JVM was
configured with the correct amount of memory.
```
SPARK_HOME=$PWD PYTHONPATH=python:python/lib/py4j-0.10.3-src.zip python -
--conf spark.driver.memory=4g
```
Note, the additional '-' is needed for the cmd line args to not be
processed when invoking the interpreter.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/BryanCutler/spark
python-gateway-conf-SPARK-17387
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/15019.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #15019
commit 100e442983bd5f546a8dad149543a26be90ee622
Author: Bryan Cutler
Date: 2016-09-09T00:01:27Z
[SPARK-17387] allow passing of args to gateway
---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---
-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org