Repository: zeppelin Updated Branches: refs/heads/branch-0.6 f342bdd40 -> 57a8451f9
ZEPPELIN-1342. Adding dependencies via SPARK_SUBMIT_OPTIONS doesn't work on Spark 2.0.0 ### What is this PR for? The root cause is due to the change of repl of scala-2.11. User needs to specify the jars in the repl setting explicitly. ### What type of PR is it? [Bug Fix] ### Todos * [ ] - Task ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-1342 ### How should this be tested? Tested manually as shown in the screenshot. ### 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 <[email protected]> Closes #1366 from zjffdu/ZEPPELIN-1342 and squashes the following commits: 10f64e6 [Jeff Zhang] fix test failure 56925d6 [Jeff Zhang] ZEPPELIN-1342. Adding dependencies via SPARK_SUBMIT_OPTIONS doesn't work on Spark 2.0.0 (cherry picked from commit c1999ea806fdb2a0739dc566420253af5cab8c46) Signed-off-by: Lee moon soo <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/57a8451f Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/57a8451f Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/57a8451f Branch: refs/heads/branch-0.6 Commit: 57a8451f944d255d24ee18931d77a20cc2e24a55 Parents: f342bdd Author: Jeff Zhang <[email protected]> Authored: Sat Aug 27 10:34:50 2016 +0800 Committer: Lee moon soo <[email protected]> Committed: Mon Aug 29 10:27:24 2016 +1000 ---------------------------------------------------------------------- .../main/java/org/apache/zeppelin/spark/SparkInterpreter.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/57a8451f/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java ---------------------------------------------------------------------- diff --git a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java index 2322ca1..bdc6129 100644 --- a/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java +++ b/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java @@ -33,6 +33,7 @@ import java.util.concurrent.atomic.AtomicInteger; import com.google.common.base.Joiner; +import org.apache.commons.lang3.StringUtils; import org.apache.hadoop.security.UserGroupInformation; import org.apache.spark.SparkConf; import org.apache.spark.SparkContext; @@ -591,7 +592,11 @@ public class SparkInterpreter extends Interpreter { argList.add("-Yrepl-class-based"); argList.add("-Yrepl-outdir"); argList.add(outputDir.getAbsolutePath()); - + if (conf.contains("spark.jars")) { + String jars = StringUtils.join(conf.get("spark.jars").split(","), File.separator); + argList.add("-classpath"); + argList.add(jars); + } scala.collection.immutable.List<String> list = JavaConversions.asScalaBuffer(argList).toList();
