You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by zs...@apache.org on 2016/10/13 23:49:14 UTC

spark git commit: [SPARK-17678][REPL][BRANCH-1.6] Honor spark.replClassServer.port in scala-2.11 repl

Repository: spark
Updated Branches:
  refs/heads/branch-1.6 585c5657f -> 18b173cfc


[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 <ss...@hortonworks.com>

Closes #15253 from jerryshao/SPARK-17678.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/18b173cf
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/18b173cf
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/18b173cf

Branch: refs/heads/branch-1.6
Commit: 18b173cfcdb15f9338be02fa7a1a89463c3239d8
Parents: 585c565
Author: jerryshao <ss...@hortonworks.com>
Authored: Thu Oct 13 16:49:11 2016 -0700
Committer: Shixiong Zhu <sh...@databricks.com>
Committed: Thu Oct 13 16:49:11 2016 -0700

----------------------------------------------------------------------
 repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/18b173cf/repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala
----------------------------------------------------------------------
diff --git a/repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala b/repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala
index 627148d..ed4cab0 100644
--- a/repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala
+++ b/repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala
@@ -36,7 +36,9 @@ object Main extends Logging {
     "-Yrepl-outdir", s"${outputDir.getAbsolutePath}",
     "-classpath", getAddedJars.mkString(File.pathSeparator)), true)
   // the creation of SecurityManager has to be lazy so SPARK_YARN_MODE is set if needed
-  lazy val classServer = new HttpServer(conf, outputDir, new SecurityManager(conf))
+  val classServerPort = conf.getInt("spark.replClassServer.port", 0)
+  lazy val classServer =
+    new HttpServer(conf, outputDir, new SecurityManager(conf), classServerPort, "HTTP class server")
   var sparkContext: SparkContext = _
   var sqlContext: SQLContext = _
   var interp = new SparkILoop // this is a public var because tests reset it.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org