{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/26726510","id":26726510,"diff_hunk":"@@ -106,6 +105,20 @@ abstract class TaskContext extends Serializable {\n   def addOnCompleteCallback(f: () => Unit)\n \n   /**\n+   * Add a (Java friendly) listener to be executed on task interruption. We add this\n+   * listener for some more clean works. An example use is to stop `receiver supervisor`\n+   * properly.\n+   */\n+  def addTaskInterruptedListener(listener: TaskInterruptionListener): TaskContext","path":"core/src/main/scala/org/apache/spark/TaskContext.scala","position":18,"original_position":18,"commit_id":"b2916fb7cdb6047eb618c2da767d18eb5a4e0caf","original_commit_id":"b2916fb7cdb6047eb618c2da767d18eb5a4e0caf","user":{"login":"JoshRosen","id":50748,"avatar_url":"https://avatars.githubusercontent.com/u/50748?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshRosen","html_url":"https://github.com/JoshRosen","followers_url":"https://api.github.com/users/JoshRosen/followers","following_url":"https://api.github.com/users/JoshRosen/following{/other_user}","gists_url":"https://api.github.com/users/JoshRosen/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshRosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshRosen/subscriptions","organizations_url":"https://api.github.com/users/JoshRosen/orgs","repos_url":"https://api.github.com/users/JoshRosen/repos","events_url":"https://api.github.com/users/JoshRosen/events{/privacy}","received_events_url":"https://api.github.com/users/JoshRosen/received_events","type":"User","site_admin":false},"body":"For consistency, I think we should call this `addTaskInterruptionListener`, since the actual listener class is named `TaskInterruptionListener` and for consistency with the other listener, which is named \"completion\" rather than \"complete\".","created_at":"2015-03-19T02:50:57Z","updated_at":"2015-03-19T02:50:57Z","html_url":"https://github.com/apache/spark/pull/4135#discussion_r26726510","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/4135","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/26726510"},"html":{"href":"https://github.com/apache/spark/pull/4135#discussion_r26726510"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/4135"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/4135","id":27744037,"html_url":"https://github.com/apache/spark/pull/4135","diff_url":"https://github.com/apache/spark/pull/4135.diff","patch_url":"https://github.com/apache/spark/pull/4135.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/4135","number":4135,"state":"open","locked":false,"title":"[SPARK-5205][Streaming]:Inconsistent behaviour between Streaming job and others, when click kill link in WebUI","user":{"login":"uncleGen","id":7402327,"avatar_url":"https://avatars.githubusercontent.com/u/7402327?v=3","gravatar_id":"","url":"https://api.github.com/users/uncleGen","html_url":"https://github.com/uncleGen","followers_url":"https://api.github.com/users/uncleGen/followers","following_url":"https://api.github.com/users/uncleGen/following{/other_user}","gists_url":"https://api.github.com/users/uncleGen/gists{/gist_id}","starred_url":"https://api.github.com/users/uncleGen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uncleGen/subscriptions","organizations_url":"https://api.github.com/users/uncleGen/orgs","repos_url":"https://api.github.com/users/uncleGen/repos","events_url":"https://api.github.com/users/uncleGen/events{/privacy}","received_events_url":"https://api.github.com/users/uncleGen/received_events","type":"User","site_admin":false},"body":"The \"kill\" link is used to kill a stage in job. It works in any kinds of Spark job but Spark Streaming. To be specific, we can only kill the stage which is used to run \"Receiver\", but not kill the \"Receivers\". Well, the stage can be killed and cleaned from the ui, but the receivers are still alive and receiving data. I think it dose not fit with the common sense. IMHO, killing the \"receiver\" stage means kill the \"receivers\" and stopping receiving data.","created_at":"2015-01-21T09:03:05Z","updated_at":"2015-03-19T02:50:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f86540d93ae1a23aa2da75fee1e31ebb9e751c3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/4135/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/4135/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/4135/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/b2916fb7cdb6047eb618c2da767d18eb5a4e0caf","head":{"label":"uncleGen:master-clean-150121","ref":"master-clean-150121","sha":"b2916fb7cdb6047eb618c2da767d18eb5a4e0caf","user":{"login":"uncleGen","id":7402327,"avatar_url":"https://avatars.githubusercontent.com/u/7402327?v=3","gravatar_id":"","url":"https://api.github.com/users/uncleGen","html_url":"https://github.com/uncleGen","followers_url":"https://api.github.com/users/uncleGen/followers","following_url":"https://api.github.com/users/uncleGen/following{/other_user}","gists_url":"https://api.github.com/users/uncleGen/gists{/gist_id}","starred_url":"https://api.github.com/users/uncleGen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uncleGen/subscriptions","organizations_url":"https://api.github.com/users/uncleGen/orgs","repos_url":"https://api.github.com/users/uncleGen/repos","events_url":"https://api.github.com/users/uncleGen/events{/privacy}","received_events_url":"https://api.github.com/users/uncleGen/received_events","type":"User","site_admin":false},"repo":{"id":23988410,"name":"spark","full_name":"uncleGen/spark","owner":{"login":"uncleGen","id":7402327,"avatar_url":"https://avatars.githubusercontent.com/u/7402327?v=3","gravatar_id":"","url":"https://api.github.com/users/uncleGen","html_url":"https://github.com/uncleGen","followers_url":"https://api.github.com/users/uncleGen/followers","following_url":"https://api.github.com/users/uncleGen/following{/other_user}","gists_url":"https://api.github.com/users/uncleGen/gists{/gist_id}","starred_url":"https://api.github.com/users/uncleGen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uncleGen/subscriptions","organizations_url":"https://api.github.com/users/uncleGen/orgs","repos_url":"https://api.github.com/users/uncleGen/repos","events_url":"https://api.github.com/users/uncleGen/events{/privacy}","received_events_url":"https://api.github.com/users/uncleGen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/uncleGen/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/uncleGen/spark","forks_url":"https://api.github.com/repos/uncleGen/spark/forks","keys_url":"https://api.github.com/repos/uncleGen/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uncleGen/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uncleGen/spark/teams","hooks_url":"https://api.github.com/repos/uncleGen/spark/hooks","issue_events_url":"https://api.github.com/repos/uncleGen/spark/issues/events{/number}","events_url":"https://api.github.com/repos/uncleGen/spark/events","assignees_url":"https://api.github.com/repos/uncleGen/spark/assignees{/user}","branches_url":"https://api.github.com/repos/uncleGen/spark/branches{/branch}","tags_url":"https://api.github.com/repos/uncleGen/spark/tags","blobs_url":"https://api.github.com/repos/uncleGen/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uncleGen/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uncleGen/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/uncleGen/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uncleGen/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/uncleGen/spark/languages","stargazers_url":"https://api.github.com/repos/uncleGen/spark/stargazers","contributors_url":"https://api.github.com/repos/uncleGen/spark/contributors","subscribers_url":"https://api.github.com/repos/uncleGen/spark/subscribers","subscription_url":"https://api.github.com/repos/uncleGen/spark/subscription","commits_url":"https://api.github.com/repos/uncleGen/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/uncleGen/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/uncleGen/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/uncleGen/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/uncleGen/spark/contents/{+path}","compare_url":"https://api.github.com/repos/uncleGen/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uncleGen/spark/merges","archive_url":"https://api.github.com/repos/uncleGen/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uncleGen/spark/downloads","issues_url":"https://api.github.com/repos/uncleGen/spark/issues{/number}","pulls_url":"https://api.github.com/repos/uncleGen/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/uncleGen/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/uncleGen/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uncleGen/spark/labels{/name}","releases_url":"https://api.github.com/repos/uncleGen/spark/releases{/id}","created_at":"2014-09-13T07:16:52Z","updated_at":"2014-09-22T08:32:37Z","pushed_at":"2015-03-18T09:21:22Z","git_url":"git://github.com/uncleGen/spark.git","ssh_url":"git@github.com:uncleGen/spark.git","clone_url":"https://github.com/uncleGen/spark.git","svn_url":"https://github.com/uncleGen/spark","homepage":null,"size":92893,"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":"c928796ade54f68e26bc55734a9867a046d2e3fe","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-03-19T02:43:26Z","pushed_at":"2015-03-19T02:43:26Z","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":1410739,"stargazers_count":3259,"watchers_count":3259,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2824,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":290,"forks":2824,"open_issues":290,"watchers":3259,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/4135"},"html":{"href":"https://github.com/apache/spark/pull/4135"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/4135"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/4135/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/4135/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/4135/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/b2916fb7cdb6047eb618c2da767d18eb5a4e0caf"}}}}