Skip to content

Commit 17c79bb

Browse files
committed
Add a configuration option for spark-shell's class server
spark.replClassServer.port
1 parent f34115d commit 17c79bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

repl/src/main/scala/org/apache/spark/repl/SparkIMain.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ import org.apache.spark.util.Utils
102102

103103
val virtualDirectory = new PlainFile(outputDir) // "directory" for classfiles
104104
/** Jetty server that will serve our classes to worker nodes */
105-
val classServer = new HttpServer(outputDir, new SecurityManager(conf))
105+
val classServerListenPort: Int = conf.getInt("spark.replClassServer.port", 0)
106+
val classServer = new HttpServer(outputDir, new SecurityManager(conf), classServerListenPort)
106107
private var currentSettings: Settings = initialSettings
107108
var printResults = true // whether to print result lines
108109
var totalSilence = false // whether to print anything

0 commit comments

Comments
 (0)