{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/9886","labels_url":"https://api.github.com/repos/apache/spark/issues/9886/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/9886/comments","events_url":"https://api.github.com/repos/apache/spark/issues/9886/events","html_url":"https://github.com/apache/spark/pull/9886","id":118207344,"number":9886,"title":"[SPARK-11859][Mesos] SparkContext accepts invalid Master URLs in the form zk://host:port for a multi-master Mesos cluster using ZooKeeper","user":{"login":"toddwan","id":15871705,"avatar_url":"https://avatars.githubusercontent.com/u/15871705?v=3","gravatar_id":"","url":"https://api.github.com/users/toddwan","html_url":"https://github.com/toddwan","followers_url":"https://api.github.com/users/toddwan/followers","following_url":"https://api.github.com/users/toddwan/following{/other_user}","gists_url":"https://api.github.com/users/toddwan/gists{/gist_id}","starred_url":"https://api.github.com/users/toddwan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddwan/subscriptions","organizations_url":"https://api.github.com/users/toddwan/orgs","repos_url":"https://api.github.com/users/toddwan/repos","events_url":"https://api.github.com/users/toddwan/events{/privacy}","received_events_url":"https://api.github.com/users/toddwan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-11-21T16:39:54Z","updated_at":"2015-11-27T14:55:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/9886","html_url":"https://github.com/apache/spark/pull/9886","diff_url":"https://github.com/apache/spark/pull/9886.diff","patch_url":"https://github.com/apache/spark/pull/9886.patch"},"body":"* 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://` \r\n\r\nhttp://spark.apache.org/docs/latest/running-on-mesos.html\r\n`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.`\r\n\r\n\r\n* 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`\r\n\r\n* For the master URLs in the form `zk:host:port`, the valid form should be `mesos://zk://host:port`\r\n\r\n* This PR restrict the validation in `SparkContext.scala`, and now only mesos master URLs prefixed with `mesos://` can be accepted.\r\n\r\n* This PR also updated corresponding unit test. "},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/160154584","html_url":"https://github.com/apache/spark/pull/9886#issuecomment-160154584","issue_url":"https://api.github.com/repos/apache/spark/issues/9886","id":160154584,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T14:55:19Z","updated_at":"2015-11-27T14:55:19Z","body":"**[Test build #2123 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2123/consoleFull)** for PR 9886 at commit [`1eeb933`](https://github.com/apache/spark/commit/1eeb933cff4451744a65e16c4a4694e2212cbcbc).\n * This patch passes all tests.\n * This patch merges cleanly.\n * This patch adds no public classes."}}