aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/shell.py
diff options
context:
space:
mode:
authorAaron Davidson <aaron@databricks.com>2013-09-05 23:36:27 -0700
committerAaron Davidson <aaron@databricks.com>2013-09-05 23:36:27 -0700
commita63d4c7dc2970900b116f7287e3d6b302d9d5698 (patch)
treedc30e2dd8435e8a3cb95717c39e491be630fcae3 /python/pyspark/shell.py
parent714e7f9e32590c302ad315b7cbee72b2e8b32b9b (diff)
downloadspark-a63d4c7dc2970900b116f7287e3d6b302d9d5698.tar.gz
spark-a63d4c7dc2970900b116f7287e3d6b302d9d5698.tar.bz2
spark-a63d4c7dc2970900b116f7287e3d6b302d9d5698.zip
SPARK-660: Add StorageLevel support in Python
It uses reflection... I am not proud of that fact, but it at least ensures compatibility (sans refactoring of the StorageLevel stuff).
Diffstat (limited to 'python/pyspark/shell.py')
-rw-r--r--python/pyspark/shell.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/pyspark/shell.py b/python/pyspark/shell.py
index 54823f8037..9acc176d55 100644
--- a/python/pyspark/shell.py
+++ b/python/pyspark/shell.py
@@ -23,12 +23,13 @@ This file is designed to be launched as a PYTHONSTARTUP script.
import os
import platform
import pyspark
-from pyspark.context import SparkContext
+from pyspark.context import SparkContext, StorageLevelReader
# this is the equivalent of ADD_JARS
add_files = os.environ.get("ADD_FILES").split(',') if os.environ.get("ADD_FILES") != None else None
sc = SparkContext(os.environ.get("MASTER", "local"), "PySparkShell", pyFiles=add_files)
+StorageLevel = StorageLevelReader(sc)
print """Welcome to
____ __