GitHub PullRequestReviewCommentEvent at 2014-09-15 18:48:55
Repository: spark
Actor: pwendell
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/17561092","id":17561092,"diff_hunk":"@@ -23,12 +23,33 @@ package org.apache.spark.scheduler\n  * of preference will be executors on the same host if this is not possible.\n  */\n private[spark]\n-class TaskLocation private (val host: String, val executorId: Option[String]) extends Serializable {\n-  override def toString: String = \"TaskLocation(\" + host + \", \" + executorId + \")\"\n+sealed abstract class TaskLocation(val host: String) {\n+}\n+\n+case class ExecutorCacheTaskLocation(override val host: String, val executorId: String)\n+    extends TaskLocation(host) {\n+}\n+\n+case class HDFSCachedTaskLocation(override val host: String) extends TaskLocation(host) {\n+  override def toString = TaskLocation.IN_MEMORY_LOCATION_TAG + host\n+}\n+\n+case class HostTaskLocation(override val host: String) extends TaskLocation(host) {\n+  override def toString = host\n }\n \n private[spark] object TaskLocation {\n-  def apply(host: String, executorId: String) = new TaskLocation(host, Some(executorId))\n+  val IN_MEMORY_LOCATION_TAG = \"_M_\"","path":"core/src/main/scala/org/apache/spark/scheduler/TaskLocation.scala","position":23,"original_position":23,"commit_id":"a8b66c717db22ab3a4c1b5ed457aee629e60582e","original_commit_id":"a8b66c717db22ab3a4c1b5ed457aee629e60582e","user":{"login":"pwendell","id":320616,"avatar_url":"https://avatars.githubusercontent.com/u/320616?v=2","gravatar_id":"def597cee3897ba290da26972ff628d2","url":"https://api.github.com/users/pwendell","html_url":"https://github.com/pwendell","followers_url":"https://api.github.com/users/pwendell/followers","following_url":"https://api.github.com/users/pwendell/following{/other_user}","gists_url":"https://api.github.com/users/pwendell/gists{/gist_id}","starred_url":"https://api.github.com/users/pwendell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwendell/subscriptions","organizations_url":"https://api.github.com/users/pwendell/orgs","repos_url":"https://api.github.com/users/pwendell/repos","events_url":"https://api.github.com/users/pwendell/events{/privacy}","received_events_url":"https://api.github.com/users/pwendell/received_events","type":"User","site_admin":false},"body":"To make this more consistent with `BlockId` can you use lower case prefixes like: `hdfs_cache_XXX`. Also is `_` reserved character in URI names? If so, it would be good to add a document in the code pointing to evidence of that fact.","created_at":"2014-09-15T18:48:55Z","updated_at":"2014-09-15T18:48:55Z","html_url":"https://github.com/apache/spark/pull/1486#discussion_r17561092","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/1486","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/17561092"},"html":{"href":"https://github.com/apache/spark/pull/1486#discussion_r17561092"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/1486"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/1486","id":18604822,"html_url":"https://github.com/apache/spark/pull/1486","diff_url":"https://github.com/apache/spark/pull/1486.diff","patch_url":"https://github.com/apache/spark/pull/1486.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/1486","number":1486,"state":"open","locked":false,"title":"SPARK-1767: Prefer HDFS-cached replicas when scheduling data-local tasks","user":{"login":"cmccabe","id":1095624,"avatar_url":"https://avatars.githubusercontent.com/u/1095624?v=2","gravatar_id":"e9f18fa493ea6b2807cdb4a7865a5eb9","url":"https://api.github.com/users/cmccabe","html_url":"https://github.com/cmccabe","followers_url":"https://api.github.com/users/cmccabe/followers","following_url":"https://api.github.com/users/cmccabe/following{/other_user}","gists_url":"https://api.github.com/users/cmccabe/gists{/gist_id}","starred_url":"https://api.github.com/users/cmccabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmccabe/subscriptions","organizations_url":"https://api.github.com/users/cmccabe/orgs","repos_url":"https://api.github.com/users/cmccabe/repos","events_url":"https://api.github.com/users/cmccabe/events{/privacy}","received_events_url":"https://api.github.com/users/cmccabe/received_events","type":"User","site_admin":false},"body":"This change reorders the replicas returned by\r\nHadoopRDD#getPreferredLocations so that replicas cached by HDFS are at\r\nthe start of the list.  This requires Hadoop 2.5 or higher; previous\r\nversions of Hadoop do not expose the information needed to determine\r\nwhether a replica is cached.","created_at":"2014-07-18T19:40:49Z","updated_at":"2014-09-15T18:48:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a285a359d48183587310b6b06f26b7967e8ccebb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/1486/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/1486/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments/{number}","comments_url":"https://api.github.com/repos/apache/spark/issues/1486/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/a8b66c717db22ab3a4c1b5ed457aee629e60582e","head":{"label":"cmccabe:SPARK-1767","ref":"SPARK-1767","sha":"a8b66c717db22ab3a4c1b5ed457aee629e60582e","user":{"login":"cmccabe","id":1095624,"avatar_url":"https://avatars.githubusercontent.com/u/1095624?v=2","gravatar_id":"e9f18fa493ea6b2807cdb4a7865a5eb9","url":"https://api.github.com/users/cmccabe","html_url":"https://github.com/cmccabe","followers_url":"https://api.github.com/users/cmccabe/followers","following_url":"https://api.github.com/users/cmccabe/following{/other_user}","gists_url":"https://api.github.com/users/cmccabe/gists{/gist_id}","starred_url":"https://api.github.com/users/cmccabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmccabe/subscriptions","organizations_url":"https://api.github.com/users/cmccabe/orgs","repos_url":"https://api.github.com/users/cmccabe/repos","events_url":"https://api.github.com/users/cmccabe/events{/privacy}","received_events_url":"https://api.github.com/users/cmccabe/received_events","type":"User","site_admin":false},"repo":{"id":20039968,"name":"spark","full_name":"cmccabe/spark","owner":{"login":"cmccabe","id":1095624,"avatar_url":"https://avatars.githubusercontent.com/u/1095624?v=2","gravatar_id":"e9f18fa493ea6b2807cdb4a7865a5eb9","url":"https://api.github.com/users/cmccabe","html_url":"https://github.com/cmccabe","followers_url":"https://api.github.com/users/cmccabe/followers","following_url":"https://api.github.com/users/cmccabe/following{/other_user}","gists_url":"https://api.github.com/users/cmccabe/gists{/gist_id}","starred_url":"https://api.github.com/users/cmccabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmccabe/subscriptions","organizations_url":"https://api.github.com/users/cmccabe/orgs","repos_url":"https://api.github.com/users/cmccabe/repos","events_url":"https://api.github.com/users/cmccabe/events{/privacy}","received_events_url":"https://api.github.com/users/cmccabe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cmccabe/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/cmccabe/spark","forks_url":"https://api.github.com/repos/cmccabe/spark/forks","keys_url":"https://api.github.com/repos/cmccabe/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cmccabe/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cmccabe/spark/teams","hooks_url":"https://api.github.com/repos/cmccabe/spark/hooks","issue_events_url":"https://api.github.com/repos/cmccabe/spark/issues/events{/number}","events_url":"https://api.github.com/repos/cmccabe/spark/events","assignees_url":"https://api.github.com/repos/cmccabe/spark/assignees{/user}","branches_url":"https://api.github.com/repos/cmccabe/spark/branches{/branch}","tags_url":"https://api.github.com/repos/cmccabe/spark/tags","blobs_url":"https://api.github.com/repos/cmccabe/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cmccabe/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cmccabe/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/cmccabe/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cmccabe/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/cmccabe/spark/languages","stargazers_url":"https://api.github.com/repos/cmccabe/spark/stargazers","contributors_url":"https://api.github.com/repos/cmccabe/spark/contributors","subscribers_url":"https://api.github.com/repos/cmccabe/spark/subscribers","subscription_url":"https://api.github.com/repos/cmccabe/spark/subscription","commits_url":"https://api.github.com/repos/cmccabe/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/cmccabe/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/cmccabe/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/cmccabe/spark/issues/comments/{number}","contents_url":"https://api.github.com/repos/cmccabe/spark/contents/{+path}","compare_url":"https://api.github.com/repos/cmccabe/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cmccabe/spark/merges","archive_url":"https://api.github.com/repos/cmccabe/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cmccabe/spark/downloads","issues_url":"https://api.github.com/repos/cmccabe/spark/issues{/number}","pulls_url":"https://api.github.com/repos/cmccabe/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/cmccabe/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/cmccabe/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cmccabe/spark/labels{/name}","releases_url":"https://api.github.com/repos/cmccabe/spark/releases{/id}","created_at":"2014-05-21T22:45:03Z","updated_at":"2014-06-08T19:28:14Z","pushed_at":"2014-09-13T00:24:57Z","git_url":"git://github.com/cmccabe/spark.git","ssh_url":"git@github.com:cmccabe/spark.git","clone_url":"https://github.com/cmccabe/spark.git","svn_url":"https://github.com/cmccabe/spark","homepage":null,"size":75168,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"af2583826c15d2a4e2732017ea20feeff0fb79f6","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=2","gravatar_id":"a676c0bf448fcd49f588249ead719b4c","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=2","gravatar_id":"a676c0bf448fcd49f588249ead719b4c","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":"2014-09-15T17:02:26Z","pushed_at":"2014-09-15T17:59:15Z","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":3145416,"stargazers_count":1468,"watchers_count":1468,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1309,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":233,"forks":1309,"open_issues":233,"watchers":1468,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/1486"},"html":{"href":"https://github.com/apache/spark/pull/1486"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/1486"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/1486/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/1486/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/1486/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/a8b66c717db22ab3a4c1b5ed457aee629e60582e"}}}}