Skip to content

Commit 9d46d85

Browse files
committed
Make sure the class path is correctly passed to the underlying REPL.
1 parent abcc7cb commit 9d46d85

File tree

1 file changed

+8
-4
lines changed
  • repl/scala-2.11/src/main/scala/org/apache/spark/repl

1 file changed

+8
-4
lines changed

repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717

1818
package org.apache.spark.repl
1919

20-
import org.apache.spark.util.Utils
21-
import org.apache.spark._
22-
import org.apache.spark.sql.SQLContext
20+
import java.io.File
2321

2422
import scala.tools.nsc.Settings
2523
import scala.tools.nsc.interpreter.SparkILoop
2624

25+
import org.apache.spark.util.Utils
26+
import org.apache.spark._
27+
import org.apache.spark.sql.SQLContext
28+
2729
object Main extends Logging {
2830

2931
val conf = new SparkConf()
@@ -32,7 +34,9 @@ object Main extends Logging {
3234
val outputDir = Utils.createTempDir(rootDir)
3335
val s = new Settings()
3436
s.processArguments(List("-Yrepl-class-based",
35-
"-Yrepl-outdir", s"${outputDir.getAbsolutePath}", "-Yrepl-sync"), true)
37+
"-Yrepl-outdir", s"${outputDir.getAbsolutePath}",
38+
"-Yrepl-sync",
39+
"-classpath", getAddedJars.mkString(File.pathSeparator)), true)
3640
val classServer = new HttpServer(conf, outputDir, new SecurityManager(conf))
3741
var sparkContext: SparkContext = _
3842
var sqlContext: SQLContext = _

0 commit comments

Comments
 (0)