aboutsummaryrefslogtreecommitdiff
path: root/docs/python-programming-guide.md
diff options
context:
space:
mode:
authorPrashant Sharma <prashant.s@imaginea.com>2014-01-03 12:12:04 +0530
committerPrashant Sharma <prashant.s@imaginea.com>2014-01-03 12:12:04 +0530
commitb4bb80002bbf0ac3642c78ae9e5c260b5da4a4cc (patch)
tree0987c307777ba5947b43aee59233df6f3568a783 /docs/python-programming-guide.md
parent08ec10de1767ca543047b79c40ab50a04ce5df2f (diff)
parent498a5f0a1c6e82a33c2ad8c48b68bbdb8da57a95 (diff)
downloadspark-b4bb80002bbf0ac3642c78ae9e5c260b5da4a4cc.tar.gz
spark-b4bb80002bbf0ac3642c78ae9e5c260b5da4a4cc.tar.bz2
spark-b4bb80002bbf0ac3642c78ae9e5c260b5da4a4cc.zip
Merge branch 'master' into spark-1002-remove-jars
Diffstat (limited to 'docs/python-programming-guide.md')
-rw-r--r--docs/python-programming-guide.md15
1 files changed, 8 insertions, 7 deletions
diff --git a/docs/python-programming-guide.md b/docs/python-programming-guide.md
index a33977ed82..45a6250eca 100644
--- a/docs/python-programming-guide.md
+++ b/docs/python-programming-guide.md
@@ -131,15 +131,16 @@ 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:
+You can set [configuration properties](configuration.html#spark-properties) by passing a
+[SparkConf](api/pyspark/pyspark.conf.SparkConf-class.html) object to SparkContext:
{% highlight python %}
-from pyspark import SparkContext
-SparkContext.setSystemProperty('spark.executor.memory', '2g')
-sc = SparkContext("local", "App Name")
+from pyspark import SparkConf, SparkContext
+conf = (SparkConf()
+ .setMaster("local")
+ .setAppName("My app")
+ .set("spark.executor.memory", "1g"))
+sc = SparkContext(conf = conf)
{% endhighlight %}
# API Docs