Skip to content

Commit

Permalink
Respect spark.master before MASTER in REPL
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewor14 committed May 21, 2014
1 parent 7c79ef7 commit 2cb81c9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala
Original file line number Diff line number Diff line change
Expand Up @@ -962,11 +962,10 @@ class SparkILoop(in0: Option[BufferedReader], protected val out: JPrintWriter,
private def getMaster(): String = {
val master = this.master match {
case Some(m) => m
case None => {
case None =>
val envMaster = sys.env.get("MASTER")
val propMaster = sys.props.get("spark.master")
envMaster.orElse(propMaster).getOrElse("local[*]")
}
propMaster.orElse(envMaster).getOrElse("local[*]")
}
master
}
Expand Down

0 comments on commit 2cb81c9

Please sign in to comment.