[
https://issues.apache.org/jira/browse/SPARK-11859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15016715#comment-15016715
]
Sean Owen commented on SPARK-11859:
-----------------------------------
OK yeah here's the key bit from
http://spark.apache.org/docs/latest/running-on-mesos.html
{code}
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.
{code}
Looks like the code and the docs indeed assume the URLs start with {{mesos://}}
so I think the regex is wrong yes.
> Regex for master URL for Mesos accepts incorrect zk:// prefix
> -------------------------------------------------------------
>
> Key: SPARK-11859
> URL: https://issues.apache.org/jira/browse/SPARK-11859
> Project: Spark
> Issue Type: Bug
> Components: Mesos
> Affects Versions: 1.6.0
> Environment: the latest sources
> Reporter: Jacek Laskowski
> Priority: Minor
>
> {{val MESOS_REGEX = """(mesos|zk)://.*""".r}} (see
> https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkContext.scala#L2748)
> accepts "zk://..." as the master URL for Mesos.
> {code}
> scala> val MESOS_REGEX = """(mesos|zk)://.*""".r
> MESOS_REGEX: scala.util.matching.Regex = (mesos|zk)://.*
> scala> "zk://aaa" match { case mesosUrl @ MESOS_REGEX(_) => println(mesosUrl)
> }
> zk://aaa
> {code}
> However, {{zk://localhost:5050}} master URL breaks spark-shell:
> {code}
> ➜ spark git:(master) ✗ ./bin/spark-shell --master zk://localhost:5050
> Error: Master must start with yarn, spark, mesos, or local
> Run with --help for usage help or --verbose for debug output
> {code}
> It should probably be {{mesos://zk://localhost:5050}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]