Repository: spark
Updated Branches:
  refs/heads/master 4e2242bb4 -> ffbbc2c58


[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 <tgra...@yahoo-inc.com>
Author: Thomas Graves <tgra...@staydecay.corp.gq1.yahoo.com>

Closes #8719 from tgravescs/SPARK-10549.


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

Branch: refs/heads/master
Commit: ffbbc2c58b9bf1e2abc2ea797feada6821ab4de8
Parents: 4e2242b
Author: Tom Graves <tgra...@yahoo-inc.com>
Authored: Mon Sep 14 15:05:19 2015 -0700
Committer: Andrew Or <and...@databricks.com>
Committed: Mon Sep 14 15:05:19 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/spark/blob/ffbbc2c5/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 be31eb2..627148d 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.


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

Reply via email to