{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/8781","labels_url":"https://api.github.com/repos/apache/spark/issues/8781/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/8781/comments","events_url":"https://api.github.com/repos/apache/spark/issues/8781/events","html_url":"https://github.com/apache/spark/pull/8781","id":106861970,"number":8781,"title":"[SPARK-10649][STREAMING] Prevent inheriting job group and irrelevant job description in streaming jobs","user":{"login":"tdas","id":663212,"avatar_url":"https://avatars.githubusercontent.com/u/663212?v=3","gravatar_id":"","url":"https://api.github.com/users/tdas","html_url":"https://github.com/tdas","followers_url":"https://api.github.com/users/tdas/followers","following_url":"https://api.github.com/users/tdas/following{/other_user}","gists_url":"https://api.github.com/users/tdas/gists{/gist_id}","starred_url":"https://api.github.com/users/tdas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdas/subscriptions","organizations_url":"https://api.github.com/users/tdas/orgs","repos_url":"https://api.github.com/users/tdas/repos","events_url":"https://api.github.com/users/tdas/events{/privacy}","received_events_url":"https://api.github.com/users/tdas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-09-16T20:54:17Z","updated_at":"2015-09-17T10:13:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/8781","html_url":"https://github.com/apache/spark/pull/8781","diff_url":"https://github.com/apache/spark/pull/8781.diff","patch_url":"https://github.com/apache/spark/pull/8781.patch"},"body":"The job group, and job descriptions information is passed through thread local properties, and get inherited by child threads. In case of spark streaming, the streaming jobs inherit these properties from the thread that called streamingContext.start(). This may not make sense. \r\n\r\n1. Job group: This is mainly used for cancelling a group of jobs together. It does not make sense to cancel streaming jobs like this, as the effect will be unpredictable. And its not a valid usecase any way, to cancel a streaming context, call streamingContext.stop()\r\n\r\n2. Job description: This is used to pass on nice text descriptions for jobs to show up in the UI. The job description of the thread that calls streamingContext.start() is not useful for all the streaming jobs, as it does not make sense for all of the streaming jobs to have the same description, and the description may or may not be related to streaming.\r\n\r\nThe solution in this PR is meant for the Spark master branch, where local properties are inherited by cloning the properties. The job group and job description in the thread that starts the streaming scheduler are explicitly removed, so that all the subsequent child threads does not inherit them. Also, the starting is done in a new child thread, so that setting the job group and description for streaming, does not change those properties in the thread that called streamingContext.start(). "},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/141035461","html_url":"https://github.com/apache/spark/pull/8781#issuecomment-141035461","issue_url":"https://api.github.com/repos/apache/spark/issues/8781","id":141035461,"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-09-17T10:13:50Z","updated_at":"2015-09-17T10:13:50Z","body":"  [Test build #42600 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/42600/consoleFull) for   PR 8781 at commit [`2afc50e`](https://github.com/apache/spark/commit/2afc50e586bc9050636292aa5394248e2d4701b9)."}}