diff options
author | Josh Rosen <joshrosen@eecs.berkeley.edu> | 2013-01-16 19:15:14 -0800 |
---|---|---|
committer | Josh Rosen <joshrosen@eecs.berkeley.edu> | 2013-01-20 13:19:19 -0800 |
commit | 7ed1bf4b485131d58ea6728e7247b79320aca9e6 (patch) | |
tree | 4c9e91c1c997d328bed7c939fdb69f6e8eed516f /python/pyspark/context.py | |
parent | fe85a075117a79675971aff0cd020bba446c0233 (diff) | |
download | spark-7ed1bf4b485131d58ea6728e7247b79320aca9e6.tar.gz spark-7ed1bf4b485131d58ea6728e7247b79320aca9e6.tar.bz2 spark-7ed1bf4b485131d58ea6728e7247b79320aca9e6.zip |
Add RDD checkpointing to Python API.
Diffstat (limited to 'python/pyspark/context.py')
-rw-r--r-- | python/pyspark/context.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/python/pyspark/context.py b/python/pyspark/context.py index 1e2f845f9c..a438b43fdc 100644 --- a/python/pyspark/context.py +++ b/python/pyspark/context.py @@ -195,3 +195,12 @@ class SparkContext(object): filename = path.split("/")[-1] os.environ["PYTHONPATH"] = \ "%s:%s" % (filename, os.environ["PYTHONPATH"]) + + def setCheckpointDir(self, dirName, useExisting=False): + """ + Set the directory under which RDDs are going to be checkpointed. This + method will create this directory and will throw an exception of the + path already exists (to avoid overwriting existing files may be + overwritten). The directory will be deleted on exit if indicated. + """ + self._jsc.sc().setCheckpointDir(dirName, useExisting) |