From f420cbf00a5f98c8eec73d251ed1d6b9352ad063 Mon Sep 17 00:00:00 2001 From: Chip Senkbeil Date: Tue, 26 Aug 2014 19:29:37 -0500 Subject: [PATCH] Added SparkContext.addJar calls to support executing code on remote clusters --- repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala b/repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala index b02b83e47aea1..53df599cf8121 100644 --- a/repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala +++ b/repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala @@ -715,6 +715,7 @@ class SparkILoop(in0: Option[BufferedReader], protected val out: JPrintWriter, addedClasspath = ClassPath.join(addedClasspath, f.path) totalClasspath = ClassPath.join(settings.classpath.value, addedClasspath) intp.addUrlsToClassPath(f.toURI.toURL) + sparkContext.addJar(f.toURI.toURL.getPath) } } } @@ -724,6 +725,7 @@ class SparkILoop(in0: Option[BufferedReader], protected val out: JPrintWriter, if (f.exists) { addedClasspath = ClassPath.join(addedClasspath, f.path) intp.addUrlsToClassPath(f.toURI.toURL) + sparkContext.addJar(f.toURI.toURL.getPath) echo("Added '%s'. Your new classpath is:\n\"%s\"".format(f.path, intp.global.classPath.asClasspathString)) } else echo("The path '" + f + "' doesn't seem to exist.")