You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2016/11/10 10:23:50 UTC

spark git commit: [MINOR][PYSPARK] Improve error message when running PySpark with different minor versions

Repository: spark
Updated Branches:
  refs/heads/master 6021c95a3 -> cc86fcd0d


[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 <vi...@gmail.com>

Closes #15822 from viirya/minor-pyspark-worker-errmsg.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/cc86fcd0
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/cc86fcd0
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/cc86fcd0

Branch: refs/heads/master
Commit: cc86fcd0d6746a9821c8082cf91dafad101e0a9c
Parents: 6021c95
Author: Liang-Chi Hsieh <vi...@gmail.com>
Authored: Thu Nov 10 10:23:45 2016 +0000
Committer: Sean Owen <so...@cloudera.com>
Committed: Thu Nov 10 10:23:45 2016 +0000

----------------------------------------------------------------------
 python/pyspark/worker.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/cc86fcd0/python/pyspark/worker.py
----------------------------------------------------------------------
diff --git a/python/pyspark/worker.py b/python/pyspark/worker.py
index cf47ab8..0918282 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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org