Skip to content

Commit 18b173c

Browse files
jerryshaozsxwing
authored andcommitted
[SPARK-17678][REPL][BRANCH-1.6] Honor spark.replClassServer.port in scala-2.11 repl
## What changes were proposed in this pull request? Spark 1.6 Scala-2.11 repl doesn't honor "spark.replClassServer.port" configuration, so user cannot set a fixed port number through "spark.replClassServer.port". ## How was this patch tested? N/A Author: jerryshao <sshao@hortonworks.com> Closes #15253 from jerryshao/SPARK-17678.
1 parent 585c565 commit 18b173c

File tree

1 file changed

+3
-1
lines changed
  • repl/scala-2.11/src/main/scala/org/apache/spark/repl

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ object Main extends Logging {
3636
"-Yrepl-outdir", s"${outputDir.getAbsolutePath}",
3737
"-classpath", getAddedJars.mkString(File.pathSeparator)), true)
3838
// the creation of SecurityManager has to be lazy so SPARK_YARN_MODE is set if needed
39-
lazy val classServer = new HttpServer(conf, outputDir, new SecurityManager(conf))
39+
val classServerPort = conf.getInt("spark.replClassServer.port", 0)
40+
lazy val classServer =
41+
new HttpServer(conf, outputDir, new SecurityManager(conf), classServerPort, "HTTP class server")
4042
var sparkContext: SparkContext = _
4143
var sqlContext: SQLContext = _
4244
var interp = new SparkILoop // this is a public var because tests reset it.

0 commit comments

Comments
 (0)