Repository: zeppelin Updated Branches: refs/heads/branch-0.8 b14d8a140 -> 79aeabfeb
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 (cherry picked from commit a13010f33cf7bb851e50a739a1dbd435a55be17d) Signed-off-by: Jeff Zhang <zjf...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/79aeabfe Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/79aeabfe Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/79aeabfe Branch: refs/heads/branch-0.8 Commit: 79aeabfeb03c23d26e9e856684af41ffba1cecb2 Parents: b14d8a1 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:35:04 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/79aeabfe/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); }