Skip to content

Commit

Permalink
Added SparkContext.addJar calls to support executing code on remote c…
Browse files Browse the repository at this point in the history
…lusters
  • Loading branch information
Chip Senkbeil committed Aug 27, 2014
1 parent a826795 commit f420cbf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala
Expand Up @@ -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)
}
}
}
Expand All @@ -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.")
Expand Down

0 comments on commit f420cbf

Please sign in to comment.