Repository: zeppelin Updated Branches: refs/heads/master 2be8f3506 -> a13010f33
ZEPPELIN-3226. Fail to launch IPySparkInterpreter in embedded mode ### What is this PR for? Trivial PR for fixing this issue. ### What type of PR is it? [Bug Fix] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-3226 ### How should this be tested? * CI Pass ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Jeff Zhang <zjf...@apache.org> Closes #2793 from zjffdu/ZEPPELIN-3226 and squashes the following commits: 4f6668b [Jeff Zhang] ZEPPELIN-3226. Fail to launch IPySparkInterpreter in embedded mode Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/a13010f3 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/a13010f3 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/a13010f3 Branch: refs/heads/master Commit: a13010f33cf7bb851e50a739a1dbd435a55be17d Parents: 2be8f35 Author: Jeff Zhang <zjf...@apache.org> Authored: Tue Feb 13 09:13:23 2018 +0800 Committer: Jeff Zhang <zjf...@apache.org> Committed: Tue Feb 13 14:34:51 2018 +0800 ---------------------------------------------------------------------- .../java/org/apache/zeppelin/spark/IPySparkInterpreter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a13010f3/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java ---------------------------------------------------------------------- diff --git a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java index c7253fb..37896f9 100644 --- a/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java +++ b/spark/interpreter/src/main/java/org/apache/zeppelin/spark/IPySparkInterpreter.java @@ -51,9 +51,10 @@ public class IPySparkInterpreter extends IPythonInterpreter { PySparkInterpreter.getPythonExec(getProperties())); sparkInterpreter = getSparkInterpreter(); SparkConf conf = sparkInterpreter.getSparkContext().getConf(); - // only set PYTHONPATH in local or yarn-client mode. + // only set PYTHONPATH in embedded, local or yarn-client mode. // yarn-cluster will setup PYTHONPATH automatically. - if (!conf.get("spark.submit.deployMode").equals("cluster")) { + if (!conf.contains("spark.submit.deployMode") || + !conf.get("spark.submit.deployMode").equals("cluster")) { setAdditionalPythonPath(PythonUtils.sparkPythonPath()); setAddBulitinPy4j(false); }