You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@toree.apache.org by lr...@apache.org on 2016/01/11 22:02:02 UTC
[20/50] [abbrv] incubator-toree git commit: Removing spark.master
cmd-line arg from kernel
Removing spark.master cmd-line arg from kernel
Project: http://git-wip-us.apache.org/repos/asf/incubator-toree/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-toree/commit/4ebe0b29
Tree: http://git-wip-us.apache.org/repos/asf/incubator-toree/tree/4ebe0b29
Diff: http://git-wip-us.apache.org/repos/asf/incubator-toree/diff/4ebe0b29
Branch: refs/heads/master
Commit: 4ebe0b292f0fdc2d5556fd3968f7595a408674d8
Parents: ef77e3f
Author: Gino Bustelo <pa...@us.ibm.com>
Authored: Wed Nov 11 17:28:45 2015 -0600
Committer: Gino Bustelo <pa...@us.ibm.com>
Committed: Tue Nov 24 08:49:50 2015 -0600
----------------------------------------------------------------------
.../com/ibm/spark/boot/CommandLineOptions.scala | 5 ----
.../ibm/spark/boot/CommandLineOptionsSpec.scala | 30 +-------------------
resources/compile/reference.conf | 1 -
3 files changed, 1 insertion(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/4ebe0b29/kernel/src/main/scala/com/ibm/spark/boot/CommandLineOptions.scala
----------------------------------------------------------------------
diff --git a/kernel/src/main/scala/com/ibm/spark/boot/CommandLineOptions.scala b/kernel/src/main/scala/com/ibm/spark/boot/CommandLineOptions.scala
index b3871f5..a5acbc2 100644
--- a/kernel/src/main/scala/com/ibm/spark/boot/CommandLineOptions.scala
+++ b/kernel/src/main/scala/com/ibm/spark/boot/CommandLineOptions.scala
@@ -42,10 +42,6 @@ class CommandLineOptions(args: Seq[String]) {
parser.accepts("profile", "path to IPython JSON connection file")
.withRequiredArg().ofType(classOf[File])
- private val _master =
- parser.accepts("master", "location of master Spark node")
- .withRequiredArg().ofType(classOf[String])
-
private val _ip =
parser.accepts("ip", "ip used to bind sockets")
.withRequiredArg().ofType(classOf[String])
@@ -139,7 +135,6 @@ class CommandLineOptions(args: Seq[String]) {
}
val commandLineConfig: Config = ConfigFactory.parseMap(Map(
- "spark.master" -> get(_master),
"stdin_port" -> get(_stdin_port),
"shell_port" -> get(_shell_port),
"iopub_port" -> get(_iopub_port),
http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/4ebe0b29/kernel/src/test/scala/com/ibm/spark/boot/CommandLineOptionsSpec.scala
----------------------------------------------------------------------
diff --git a/kernel/src/test/scala/com/ibm/spark/boot/CommandLineOptionsSpec.scala b/kernel/src/test/scala/com/ibm/spark/boot/CommandLineOptionsSpec.scala
index ab6748a..703d677 100644
--- a/kernel/src/test/scala/com/ibm/spark/boot/CommandLineOptionsSpec.scala
+++ b/kernel/src/test/scala/com/ibm/spark/boot/CommandLineOptionsSpec.scala
@@ -132,31 +132,6 @@ class CommandLineOptionsSpec extends FunSpec with Matchers {
}
}
- describe("when received --master=<value>") {
- it("should error if value is not set") {
- intercept[OptionException] {
- new CommandLineOptions(Seq("--master"))
- }
- }
-
- describe("#toConfig") {
- it("should set master to specified value") {
- val expected = "test"
- val options = new CommandLineOptions(s"--master=${expected}" :: Nil)
- val config: Config = options.toConfig
-
- config.getString("spark.master") should be(expected)
- }
-
- it("should set master to local[*]") {
- val options = new CommandLineOptions(Nil)
- val config: Config = options.toConfig
-
- config.getString("spark.master") should be("local[*]")
- }
- }
- }
-
describe("when received --profile=<path>") {
it("should error if path is not set") {
intercept[OptionException] {
@@ -308,7 +283,7 @@ class CommandLineOptionsSpec extends FunSpec with Matchers {
config.getString("ip") should be(expected)
}
- it("should set master to local[*]") {
+ it("should set ip to 127.0.0.1") {
val options = new CommandLineOptions(Nil)
val config: Config = options.toConfig
@@ -319,18 +294,15 @@ class CommandLineOptionsSpec extends FunSpec with Matchers {
describe("when received options with surrounding whitespace") {
it("should trim whitespace") {
- val master = "test"
val url1 = "url1"
val url2 = "url2"
val options = new CommandLineOptions(Seq(
- s"--master=${master} ",
" --magic-url ", s" ${url1}\t",
"--magic-url", s" \t ${url2} \t"
))
val config: Config = options.toConfig
- config.getString("spark.master") should be(master)
config.getList("magic_urls").unwrapped.asScala should
be (Seq(url1, url2))
}
http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/4ebe0b29/resources/compile/reference.conf
----------------------------------------------------------------------
diff --git a/resources/compile/reference.conf b/resources/compile/reference.conf
index d64d2b8..a01a88c 100644
--- a/resources/compile/reference.conf
+++ b/resources/compile/reference.conf
@@ -35,7 +35,6 @@ ip = ${?IP}
transport = "tcp"
signature_scheme = "hmac-sha256"
key = ""
-spark.master = "local[*]"
ivy_local = "/tmp/.ivy2"
ivy_local = ${?IVY_LOCAL}