GitHub user toddwan opened a pull request:
https://github.com/apache/spark/pull/9886
[SPARK-11859][Mesos] SparkContext accepts invalid Master URLs in the form
zk://host:port for a multi-master Mesos cluster using ZooKeeper
* According to below doc and validation logic in
[SparkSubmit.scala](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala#L231),
master URL for a mesos cluster should always start with `mesos://`
http://spark.apache.org/docs/latest/running-on-mesos.html
`The Master URLs for Mesos are in the form mesos://host:5050 for a
single-master Mesos cluster, or mesos://zk://host:2181 for a multi-master Mesos
cluster using ZooKeeper.`
* However,
[SparkContext.scala](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkContext.scala#L2749)
fails the validation and can receive master URL in the form `zk://host:port`
* For the master URLs in the form `zk:host:port`, the valid form should be
`mesos://zk://host:port`
* This PR restrict the validation in `SparkContext.scala`, and now only
mesos master URLs prefixed with `mesos://` can be accepted.
* This PR also updated corresponding unit test.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/toddwan/spark S11859
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/9886.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #9886
----
commit c213acc1f5728a2cb8dc1cc68f83e13692c6eb5e
Author: toddwan <[email protected]>
Date: 2015-11-21T16:21:40Z
SparkContext accepts invalid Master URLs like 'zk://host:port' for a
multi-master Mesos cluster using ZooKeeper
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]