{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/27669598","id":27669598,"diff_hunk":"@@ -0,0 +1,50 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements.  See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * the License.  You may obtain a copy of the License at\n+ *\n+ *    http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.apache.spark.deploy.mesos\n+\n+import java.util.Date\n+\n+import scala.collection.mutable\n+\n+import org.apache.spark.deploy.Command\n+\n+/**\n+ * Describes a Spark driver that is submitted from the\n+ * [[org.apache.spark.deploy.rest.mesos.MesosRestServer]], to be launched by\n+ * [[org.apache.spark.scheduler.cluster.mesos.MesosClusterScheduler]].\n+ * @param jarUrl URL to the application jar\n+ * @param mem Amount of memory for the driver\n+ * @param cores Amount of cores for the driver\n+ * @param supervise Supervise the driver for long running app\n+ * @param command The command to launch the driver.\n+ * @param schedulerProperties Extra properties to pass the Mesos scheduler\n+ */\n+private[spark] class MesosDriverDescription(\n+    val jarUrl: String,\n+    val mem: Int,\n+    val cores: Int,\n+    val supervise: Boolean,\n+    val command: Command,\n+    val schedulerProperties: mutable.HashMap[String, String])","path":"core/src/main/scala/org/apache/spark/deploy/mesos/MesosDriverDescription.scala","position":43,"original_position":43,"commit_id":"8f6499571685db8ce2504ff4b2dfd5e23212bcc0","original_commit_id":"8f6499571685db8ce2504ff4b2dfd5e23212bcc0","user":{"login":"dragos","id":133742,"avatar_url":"https://avatars.githubusercontent.com/u/133742?v=3","gravatar_id":"","url":"https://api.github.com/users/dragos","html_url":"https://github.com/dragos","followers_url":"https://api.github.com/users/dragos/followers","following_url":"https://api.github.com/users/dragos/following{/other_user}","gists_url":"https://api.github.com/users/dragos/gists{/gist_id}","starred_url":"https://api.github.com/users/dragos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragos/subscriptions","organizations_url":"https://api.github.com/users/dragos/orgs","repos_url":"https://api.github.com/users/dragos/repos","events_url":"https://api.github.com/users/dragos/events{/privacy}","received_events_url":"https://api.github.com/users/dragos/received_events","type":"User","site_admin":false},"body":"Is it necessary to have this mutable map? If this class just carries over some parameters, I'd find it more natural to make it a `case class` and immutable.","created_at":"2015-04-02T15:46:39Z","updated_at":"2015-04-02T15:46:39Z","html_url":"https://github.com/apache/spark/pull/5144#discussion_r27669598","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/5144","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/27669598"},"html":{"href":"https://github.com/apache/spark/pull/5144#discussion_r27669598"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/5144"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/5144","id":31778104,"html_url":"https://github.com/apache/spark/pull/5144","diff_url":"https://github.com/apache/spark/pull/5144.diff","patch_url":"https://github.com/apache/spark/pull/5144.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/5144","number":5144,"state":"open","locked":false,"title":"[SPARK-5338][MESOS] Add cluster mode support for Mesos","user":{"login":"tnachen","id":67244,"avatar_url":"https://avatars.githubusercontent.com/u/67244?v=3","gravatar_id":"","url":"https://api.github.com/users/tnachen","html_url":"https://github.com/tnachen","followers_url":"https://api.github.com/users/tnachen/followers","following_url":"https://api.github.com/users/tnachen/following{/other_user}","gists_url":"https://api.github.com/users/tnachen/gists{/gist_id}","starred_url":"https://api.github.com/users/tnachen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnachen/subscriptions","organizations_url":"https://api.github.com/users/tnachen/orgs","repos_url":"https://api.github.com/users/tnachen/repos","events_url":"https://api.github.com/users/tnachen/events{/privacy}","received_events_url":"https://api.github.com/users/tnachen/received_events","type":"User","site_admin":false},"body":"This patch adds the support for cluster mode to run on Mesos.\r\nIt introduces a new Mesos framework dedicated to launch new apps/drivers, and can be called with the spark-submit script and specifying --master flag to the cluster mode REST interface instead of Mesos master.\r\n\r\nExample:\r\n./bin/spark-submit --deploy-mode cluster --class org.apache.spark.examples.SparkPi --master mesos://10.0.0.206:8077 --executor-memory 1G --total-executor-cores 100 examples/target/spark-examples_2.10-1.3.0-SNAPSHOT.jar 30\r\n\r\nPart of this patch is also to abstract the StandaloneRestServer so it can have different implementations of the REST endpoints.\r\n\r\nFeatures of the cluster mode in this PR:\r\n- Supports supervise mode where scheduler will keep trying to reschedule exited job.\r\n- Adds a new UI for the cluster mode scheduler to see all the running jobs, finished jobs, and supervise jobs waiting to be retried\r\n- Supports state persistence to ZK, so when the cluster scheduler fails over it can pick up all the queued and running jobs\r\n","created_at":"2015-03-23T21:54:56Z","updated_at":"2015-04-02T15:46:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de95b23062d24f5d46e8e0b4647e6922d257811f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/5144/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/5144/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/5144/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/8f6499571685db8ce2504ff4b2dfd5e23212bcc0","head":{"label":"tnachen:mesos_cluster_mode","ref":"mesos_cluster_mode","sha":"8f6499571685db8ce2504ff4b2dfd5e23212bcc0","user":{"login":"tnachen","id":67244,"avatar_url":"https://avatars.githubusercontent.com/u/67244?v=3","gravatar_id":"","url":"https://api.github.com/users/tnachen","html_url":"https://github.com/tnachen","followers_url":"https://api.github.com/users/tnachen/followers","following_url":"https://api.github.com/users/tnachen/following{/other_user}","gists_url":"https://api.github.com/users/tnachen/gists{/gist_id}","starred_url":"https://api.github.com/users/tnachen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnachen/subscriptions","organizations_url":"https://api.github.com/users/tnachen/orgs","repos_url":"https://api.github.com/users/tnachen/repos","events_url":"https://api.github.com/users/tnachen/events{/privacy}","received_events_url":"https://api.github.com/users/tnachen/received_events","type":"User","site_admin":false},"repo":{"id":21994538,"name":"spark","full_name":"tnachen/spark","owner":{"login":"tnachen","id":67244,"avatar_url":"https://avatars.githubusercontent.com/u/67244?v=3","gravatar_id":"","url":"https://api.github.com/users/tnachen","html_url":"https://github.com/tnachen","followers_url":"https://api.github.com/users/tnachen/followers","following_url":"https://api.github.com/users/tnachen/following{/other_user}","gists_url":"https://api.github.com/users/tnachen/gists{/gist_id}","starred_url":"https://api.github.com/users/tnachen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tnachen/subscriptions","organizations_url":"https://api.github.com/users/tnachen/orgs","repos_url":"https://api.github.com/users/tnachen/repos","events_url":"https://api.github.com/users/tnachen/events{/privacy}","received_events_url":"https://api.github.com/users/tnachen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tnachen/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/tnachen/spark","forks_url":"https://api.github.com/repos/tnachen/spark/forks","keys_url":"https://api.github.com/repos/tnachen/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tnachen/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tnachen/spark/teams","hooks_url":"https://api.github.com/repos/tnachen/spark/hooks","issue_events_url":"https://api.github.com/repos/tnachen/spark/issues/events{/number}","events_url":"https://api.github.com/repos/tnachen/spark/events","assignees_url":"https://api.github.com/repos/tnachen/spark/assignees{/user}","branches_url":"https://api.github.com/repos/tnachen/spark/branches{/branch}","tags_url":"https://api.github.com/repos/tnachen/spark/tags","blobs_url":"https://api.github.com/repos/tnachen/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tnachen/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tnachen/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/tnachen/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tnachen/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/tnachen/spark/languages","stargazers_url":"https://api.github.com/repos/tnachen/spark/stargazers","contributors_url":"https://api.github.com/repos/tnachen/spark/contributors","subscribers_url":"https://api.github.com/repos/tnachen/spark/subscribers","subscription_url":"https://api.github.com/repos/tnachen/spark/subscription","commits_url":"https://api.github.com/repos/tnachen/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/tnachen/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/tnachen/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/tnachen/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/tnachen/spark/contents/{+path}","compare_url":"https://api.github.com/repos/tnachen/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tnachen/spark/merges","archive_url":"https://api.github.com/repos/tnachen/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tnachen/spark/downloads","issues_url":"https://api.github.com/repos/tnachen/spark/issues{/number}","pulls_url":"https://api.github.com/repos/tnachen/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/tnachen/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/tnachen/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tnachen/spark/labels{/name}","releases_url":"https://api.github.com/repos/tnachen/spark/releases{/id}","created_at":"2014-07-18T21:08:12Z","updated_at":"2015-03-12T16:55:55Z","pushed_at":"2015-04-01T07:21:34Z","git_url":"git://github.com/tnachen/spark.git","ssh_url":"git@github.com:tnachen/spark.git","clone_url":"https://github.com/tnachen/spark.git","svn_url":"https://github.com/tnachen/spark","homepage":null,"size":94549,"stargazers_count":1,"watchers_count":1,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"37326079d818fdb140415a65653767d997613dac","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-04-02T14:35:22Z","pushed_at":"2015-04-02T15:34:09Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":1463336,"stargazers_count":3466,"watchers_count":3466,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2986,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":319,"forks":2986,"open_issues":319,"watchers":3466,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/5144"},"html":{"href":"https://github.com/apache/spark/pull/5144"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/5144"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/5144/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/5144/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/5144/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/8f6499571685db8ce2504ff4b2dfd5e23212bcc0"}}}}