diff options
author | Davies Liu <davies@databricks.com> | 2015-05-18 12:55:13 -0700 |
---|---|---|
committer | Josh Rosen <joshrosen@databricks.com> | 2015-05-18 12:55:13 -0700 |
commit | 32fbd297dd651ba3ce4ce52aeb0488233149cdf9 (patch) | |
tree | c18970db228448c856f8ce9538d708511e9e95fd /python/pyspark/context.py | |
parent | 9dadf019b93038e1e18336ccd06c5eecb4bae32f (diff) | |
download | spark-32fbd297dd651ba3ce4ce52aeb0488233149cdf9.tar.gz spark-32fbd297dd651ba3ce4ce52aeb0488233149cdf9.tar.bz2 spark-32fbd297dd651ba3ce4ce52aeb0488233149cdf9.zip |
[SPARK-6216] [PYSPARK] check python version of worker with driver
This PR revert #5404, change to pass the version of python in driver into JVM, check it in worker before deserializing closure, then it can works with different major version of Python.
Author: Davies Liu <davies@databricks.com>
Closes #6203 from davies/py_version and squashes the following commits:
b8fb76e [Davies Liu] fix test
6ce5096 [Davies Liu] use string for version
47c6278 [Davies Liu] check python version of worker with driver
Diffstat (limited to 'python/pyspark/context.py')
-rw-r--r-- | python/pyspark/context.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/python/pyspark/context.py b/python/pyspark/context.py index 31992795a9..d25ee85523 100644 --- a/python/pyspark/context.py +++ b/python/pyspark/context.py @@ -173,6 +173,7 @@ class SparkContext(object): self._jvm.PythonAccumulatorParam(host, port)) self.pythonExec = os.environ.get("PYSPARK_PYTHON", 'python') + self.pythonVer = "%d.%d" % sys.version_info[:2] # Broadcast's __reduce__ method stores Broadcast instances here. # This allows other code to determine which Broadcast instances have |