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 <[email protected]> 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 <[email protected]> Authored: Thu Nov 10 10:23:45 2016 +0000 Committer: Sean Owen <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
