Repository: spark
Updated Branches:
  refs/heads/branch-2.1 8c489a78d -> b54d71b6f


[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 <[email protected]>

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

(cherry picked from commit cc86fcd0d6746a9821c8082cf91dafad101e0a9c)
Signed-off-by: Sean Owen <[email protected]>


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

Branch: refs/heads/branch-2.1
Commit: b54d71b6f3e265b0af9fad30c0f1ea5d2baa1a94
Parents: 8c489a7
Author: Liang-Chi Hsieh <[email protected]>
Authored: Thu Nov 10 10:23:45 2016 +0000
Committer: Sean Owen <[email protected]>
Committed: Thu Nov 10 10:23:57 2016 +0000

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


http://git-wip-us.apache.org/repos/asf/spark/blob/b54d71b6/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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to