aboutsummaryrefslogtreecommitdiff
path: root/repl
diff options
context:
space:
mode:
authorTom Graves <tgraves@yahoo-inc.com>2015-09-14 15:05:19 -0700
committerAndrew Or <andrew@databricks.com>2015-09-14 15:05:19 -0700
commitffbbc2c58b9bf1e2abc2ea797feada6821ab4de8 (patch)
treeee3ccc5b52a1b96f6dbe55dcfc12b52f7c61aecc /repl
parent4e2242bb41dda922573046c00c5142745632f95f (diff)
downloadspark-ffbbc2c58b9bf1e2abc2ea797feada6821ab4de8.tar.gz
spark-ffbbc2c58b9bf1e2abc2ea797feada6821ab4de8.tar.bz2
spark-ffbbc2c58b9bf1e2abc2ea797feada6821ab4de8.zip
[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.
Diffstat (limited to 'repl')
-rw-r--r--repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala3
1 files changed, 2 insertions, 1 deletions
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 be31eb2eda..627148df80 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
@@ -35,7 +35,8 @@ object Main extends Logging {
s.processArguments(List("-Yrepl-class-based",
"-Yrepl-outdir", s"${outputDir.getAbsolutePath}",
"-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 sqlContext: SQLContext = _
var interp = new SparkILoop // this is a public var because tests reset it.