aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiang-Chi Hsieh <viirya@gmail.com>2016-11-10 10:23:45 +0000
committerSean Owen <sowen@cloudera.com>2016-11-10 10:23:45 +0000
commitcc86fcd0d6746a9821c8082cf91dafad101e0a9c (patch)
treeca221e986f963f94909e883d99617f732fcee64f
parent6021c95a3aa3858b0499782b23b08ef92c73245d (diff)
downloadspark-cc86fcd0d6746a9821c8082cf91dafad101e0a9c.tar.gz
spark-cc86fcd0d6746a9821c8082cf91dafad101e0a9c.tar.bz2
spark-cc86fcd0d6746a9821c8082cf91dafad101e0a9c.zip
[MINOR][PYSPARK] Improve error message when running PySpark with different minor versions
## What changes were proposed in this pull request? Currently the error message is correct but doesn't provide additional hint to new users. It would be better to hint related configuration to users in the message. ## How was this patch tested? N/A because it only changes error message. Please review https://cwiki.apache.org/confluence/display/SPARK/Contributing+to+Spark before opening a pull request. Author: Liang-Chi Hsieh <viirya@gmail.com> Closes #15822 from viirya/minor-pyspark-worker-errmsg.
-rw-r--r--python/pyspark/worker.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/pyspark/worker.py b/python/pyspark/worker.py
index cf47ab8f96..0918282953 100644
--- a/python/pyspark/worker.py
+++ b/python/pyspark/worker.py
@@ -119,7 +119,9 @@ def main(infile, outfile):
version = utf8_deserializer.loads(infile)
if version != "%d.%d" % sys.version_info[:2]:
raise Exception(("Python in worker has different version %s than that in " +
- "driver %s, PySpark cannot run with different minor versions") %
+ "driver %s, PySpark cannot run with different minor versions." +
+ "Please check environment variables PYSPARK_PYTHON and " +
+ "PYSPARK_DRIVER_PYTHON are correctly set.") %
("%d.%d" % sys.version_info[:2], version))
# initialize global state