{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/36264237","id":36264237,"diff_hunk":"@@ -132,23 +132,41 @@ private[spark] class YarnClientSchedulerBackend(\n   }\n \n   /**\n+   * We create this class at SPARK-9519. Basically when we interrupt the monitor thread it's\n+   * because the SparkContext is being shut down(sc.stop() called by user code), but if\n+   * monitorApplication return, it means the Yarn application finished before sc.stop() was called,\n+   * which means we should call sc.stop() here, and we don't allow the monitor being interrupt\n+   * before SparkContext stop successfully.","path":"yarn/src/main/scala/org/apache/spark/scheduler/cluster/YarnClientSchedulerBackend.scala","position":17,"original_position":17,"commit_id":"2e8e365fee2ecc0745efe6e722aae39721994c6f","original_commit_id":"2e8e365fee2ecc0745efe6e722aae39721994c6f","user":{"login":"vanzin","id":1694083,"avatar_url":"https://avatars.githubusercontent.com/u/1694083?v=3","gravatar_id":"","url":"https://api.github.com/users/vanzin","html_url":"https://github.com/vanzin","followers_url":"https://api.github.com/users/vanzin/followers","following_url":"https://api.github.com/users/vanzin/following{/other_user}","gists_url":"https://api.github.com/users/vanzin/gists{/gist_id}","starred_url":"https://api.github.com/users/vanzin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanzin/subscriptions","organizations_url":"https://api.github.com/users/vanzin/orgs","repos_url":"https://api.github.com/users/vanzin/repos","events_url":"https://api.github.com/users/vanzin/events{/privacy}","received_events_url":"https://api.github.com/users/vanzin/received_events","type":"User","site_admin":false},"body":"nit: \"is stopped\"","created_at":"2015-08-05T02:21:04Z","updated_at":"2015-08-05T02:21:04Z","html_url":"https://github.com/apache/spark/pull/7846#discussion_r36264237","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/7846","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/36264237"},"html":{"href":"https://github.com/apache/spark/pull/7846#discussion_r36264237"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/7846"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/7846","id":41395297,"html_url":"https://github.com/apache/spark/pull/7846","diff_url":"https://github.com/apache/spark/pull/7846.diff","patch_url":"https://github.com/apache/spark/pull/7846.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/7846","number":7846,"state":"open","locked":false,"title":"[SPARK-9519][Yarn] Confirm stop sc successfully when application was killed","user":{"login":"Sephiroth-Lin","id":10866770,"avatar_url":"https://avatars.githubusercontent.com/u/10866770?v=3","gravatar_id":"","url":"https://api.github.com/users/Sephiroth-Lin","html_url":"https://github.com/Sephiroth-Lin","followers_url":"https://api.github.com/users/Sephiroth-Lin/followers","following_url":"https://api.github.com/users/Sephiroth-Lin/following{/other_user}","gists_url":"https://api.github.com/users/Sephiroth-Lin/gists{/gist_id}","starred_url":"https://api.github.com/users/Sephiroth-Lin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sephiroth-Lin/subscriptions","organizations_url":"https://api.github.com/users/Sephiroth-Lin/orgs","repos_url":"https://api.github.com/users/Sephiroth-Lin/repos","events_url":"https://api.github.com/users/Sephiroth-Lin/events{/privacy}","received_events_url":"https://api.github.com/users/Sephiroth-Lin/received_events","type":"User","site_admin":false},"body":"Currently, when we kill application on Yarn, then will call sc.stop() at Yarn application state monitor thread, then in YarnClientSchedulerBackend.stop() will call interrupt this will cause SparkContext not stop fully as we will wait executor to exit.","created_at":"2015-08-01T03:06:53Z","updated_at":"2015-08-05T02:21:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54e646887f798b67ea044b357eb31a933c4fbb6d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/7846/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/7846/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/7846/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/2e8e365fee2ecc0745efe6e722aae39721994c6f","head":{"label":"Sephiroth-Lin:SPARK-9519","ref":"SPARK-9519","sha":"2e8e365fee2ecc0745efe6e722aae39721994c6f","user":{"login":"Sephiroth-Lin","id":10866770,"avatar_url":"https://avatars.githubusercontent.com/u/10866770?v=3","gravatar_id":"","url":"https://api.github.com/users/Sephiroth-Lin","html_url":"https://github.com/Sephiroth-Lin","followers_url":"https://api.github.com/users/Sephiroth-Lin/followers","following_url":"https://api.github.com/users/Sephiroth-Lin/following{/other_user}","gists_url":"https://api.github.com/users/Sephiroth-Lin/gists{/gist_id}","starred_url":"https://api.github.com/users/Sephiroth-Lin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sephiroth-Lin/subscriptions","organizations_url":"https://api.github.com/users/Sephiroth-Lin/orgs","repos_url":"https://api.github.com/users/Sephiroth-Lin/repos","events_url":"https://api.github.com/users/Sephiroth-Lin/events{/privacy}","received_events_url":"https://api.github.com/users/Sephiroth-Lin/received_events","type":"User","site_admin":false},"repo":{"id":30388176,"name":"spark","full_name":"Sephiroth-Lin/spark","owner":{"login":"Sephiroth-Lin","id":10866770,"avatar_url":"https://avatars.githubusercontent.com/u/10866770?v=3","gravatar_id":"","url":"https://api.github.com/users/Sephiroth-Lin","html_url":"https://github.com/Sephiroth-Lin","followers_url":"https://api.github.com/users/Sephiroth-Lin/followers","following_url":"https://api.github.com/users/Sephiroth-Lin/following{/other_user}","gists_url":"https://api.github.com/users/Sephiroth-Lin/gists{/gist_id}","starred_url":"https://api.github.com/users/Sephiroth-Lin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sephiroth-Lin/subscriptions","organizations_url":"https://api.github.com/users/Sephiroth-Lin/orgs","repos_url":"https://api.github.com/users/Sephiroth-Lin/repos","events_url":"https://api.github.com/users/Sephiroth-Lin/events{/privacy}","received_events_url":"https://api.github.com/users/Sephiroth-Lin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sephiroth-Lin/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/Sephiroth-Lin/spark","forks_url":"https://api.github.com/repos/Sephiroth-Lin/spark/forks","keys_url":"https://api.github.com/repos/Sephiroth-Lin/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sephiroth-Lin/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sephiroth-Lin/spark/teams","hooks_url":"https://api.github.com/repos/Sephiroth-Lin/spark/hooks","issue_events_url":"https://api.github.com/repos/Sephiroth-Lin/spark/issues/events{/number}","events_url":"https://api.github.com/repos/Sephiroth-Lin/spark/events","assignees_url":"https://api.github.com/repos/Sephiroth-Lin/spark/assignees{/user}","branches_url":"https://api.github.com/repos/Sephiroth-Lin/spark/branches{/branch}","tags_url":"https://api.github.com/repos/Sephiroth-Lin/spark/tags","blobs_url":"https://api.github.com/repos/Sephiroth-Lin/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sephiroth-Lin/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sephiroth-Lin/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sephiroth-Lin/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sephiroth-Lin/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/Sephiroth-Lin/spark/languages","stargazers_url":"https://api.github.com/repos/Sephiroth-Lin/spark/stargazers","contributors_url":"https://api.github.com/repos/Sephiroth-Lin/spark/contributors","subscribers_url":"https://api.github.com/repos/Sephiroth-Lin/spark/subscribers","subscription_url":"https://api.github.com/repos/Sephiroth-Lin/spark/subscription","commits_url":"https://api.github.com/repos/Sephiroth-Lin/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sephiroth-Lin/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sephiroth-Lin/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sephiroth-Lin/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sephiroth-Lin/spark/contents/{+path}","compare_url":"https://api.github.com/repos/Sephiroth-Lin/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sephiroth-Lin/spark/merges","archive_url":"https://api.github.com/repos/Sephiroth-Lin/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sephiroth-Lin/spark/downloads","issues_url":"https://api.github.com/repos/Sephiroth-Lin/spark/issues{/number}","pulls_url":"https://api.github.com/repos/Sephiroth-Lin/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/Sephiroth-Lin/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/Sephiroth-Lin/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sephiroth-Lin/spark/labels{/name}","releases_url":"https://api.github.com/repos/Sephiroth-Lin/spark/releases{/id}","created_at":"2015-02-06T01:20:43Z","updated_at":"2015-02-06T01:21:00Z","pushed_at":"2015-08-05T01:42:02Z","git_url":"git://github.com/Sephiroth-Lin/spark.git","ssh_url":"git@github.com:Sephiroth-Lin/spark.git","clone_url":"https://github.com/Sephiroth-Lin/spark.git","svn_url":"https://github.com/Sephiroth-Lin/spark","homepage":null,"size":113564,"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":"712f5b7a9ab52c26e3d086629633950ec2fb7afc","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-08-05T00:55:43Z","pushed_at":"2015-08-05T02:04:14Z","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":1658702,"stargazers_count":4963,"watchers_count":4963,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4506,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":325,"forks":4506,"open_issues":325,"watchers":4963,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/7846"},"html":{"href":"https://github.com/apache/spark/pull/7846"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/7846"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/7846/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/7846/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/7846/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/2e8e365fee2ecc0745efe6e722aae39721994c6f"}}}}