From c8748c25eb2812d82a1b6b8433a1531bb00fa335 Mon Sep 17 00:00:00 2001 From: Ewen Cheslack-Postava <me@ewencp.org> Date: Tue, 22 Oct 2013 11:49:52 -0700 Subject: [PATCH] Add notes to python documentation about using SparkContext.setSystemProperty. --- docs/python-programming-guide.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/python-programming-guide.md b/docs/python-programming-guide.md index 6c2336ad0c..55e39b1de1 100644 --- a/docs/python-programming-guide.md +++ b/docs/python-programming-guide.md @@ -131,6 +131,17 @@ sc = SparkContext("local", "App Name", pyFiles=['MyFile.py', 'lib.zip', 'app.egg Files listed here will be added to the `PYTHONPATH` and shipped to remote worker machines. Code dependencies can be added to an existing SparkContext using its `addPyFile()` method. +You can set [system properties](configuration.html#system-properties) +using `SparkContext.setSystemProperty()` class method *before* +instantiating SparkContext. For example, to set the amount of memory +per executor process: + +{% highlight python %} +from pyspark import SparkContext +SparkContext.setSystemProperty('spark.executor.memory', '2g') +sc = SparkContext("local", "App Name") +{% endhighlight %} + # API Docs [API documentation](api/pyspark/index.html) for PySpark is available as Epydoc. -- GitLab