Skip to content
Snippets Groups Projects
Commit ffbbc2c5 authored by Tom Graves's avatar Tom Graves Committed by Andrew Or
Browse files

[SPARK-10549] scala 2.11 spark on yarn with security - Repl doesn't work

Make this lazy so that it can set the yarn mode before creating the securityManager.

Author: Tom Graves <tgraves@yahoo-inc.com>
Author: Thomas Graves <tgraves@staydecay.corp.gq1.yahoo.com>

Closes #8719 from tgravescs/SPARK-10549.
parent 4e2242bb
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,8 @@ object Main extends Logging { ...@@ -35,7 +35,8 @@ object Main extends Logging {
s.processArguments(List("-Yrepl-class-based", s.processArguments(List("-Yrepl-class-based",
"-Yrepl-outdir", s"${outputDir.getAbsolutePath}", "-Yrepl-outdir", s"${outputDir.getAbsolutePath}",
"-classpath", getAddedJars.mkString(File.pathSeparator)), true) "-classpath", getAddedJars.mkString(File.pathSeparator)), true)
val classServer = new HttpServer(conf, outputDir, new SecurityManager(conf)) // 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))
var sparkContext: SparkContext = _ var sparkContext: SparkContext = _
var sqlContext: SQLContext = _ var sqlContext: SQLContext = _
var interp = new SparkILoop // this is a public var because tests reset it. var interp = new SparkILoop // this is a public var because tests reset it.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment