{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/14816","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/14816/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/14816/comments","events_url":"https://api.github.com/repos/apache/spark/issues/14816/events","html_url":"https://github.com/apache/spark/pull/14816","id":173322466,"number":14816,"title":"[SPARK-17245] [SQL] [BRANCH-1.6] Do not rely on Hive's session state to retrieve HiveConf","user":{"login":"yhuai","id":2072857,"avatar_url":"https://avatars.githubusercontent.com/u/2072857?v=3","gravatar_id":"","url":"https://api.github.com/users/yhuai","html_url":"https://github.com/yhuai","followers_url":"https://api.github.com/users/yhuai/followers","following_url":"https://api.github.com/users/yhuai/following{/other_user}","gists_url":"https://api.github.com/users/yhuai/gists{/gist_id}","starred_url":"https://api.github.com/users/yhuai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yhuai/subscriptions","organizations_url":"https://api.github.com/users/yhuai/orgs","repos_url":"https://api.github.com/users/yhuai/repos","events_url":"https://api.github.com/users/yhuai/events{/privacy}","received_events_url":"https://api.github.com/users/yhuai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-25T22:08:42Z","updated_at":"2016-09-07T13:55:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/14816","html_url":"https://github.com/apache/spark/pull/14816","diff_url":"https://github.com/apache/spark/pull/14816.diff","patch_url":"https://github.com/apache/spark/pull/14816.patch"},"body":"## What changes were proposed in this pull request?\r\nRight now, we rely on Hive's `SessionState.get()` to retrieve the HiveConf used by ClientWrapper. However, this conf is actually the HiveConf set with the `state`. There is a small chance that we are trying to use the Hive client in a new thread while the global client has not been created yet. In this case, `SessionState.get()` will return a `null`, which causes a NPE when we call `SessionState.get(). getConf `. Since the conf that we want is actually the conf we set to `state`. I am changing the code to just call `state.getConf` (this is also what Spark 2.0 does).\r\n\r\n## How was this patch tested?\r\nI have not figured out a good way to reproduce this."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/245287942","html_url":"https://github.com/apache/spark/pull/14816#issuecomment-245287942","issue_url":"https://api.github.com/repos/apache/spark/issues/14816","id":245287942,"user":{"login":"cloud-fan","id":3182036,"avatar_url":"https://avatars.githubusercontent.com/u/3182036?v=3","gravatar_id":"","url":"https://api.github.com/users/cloud-fan","html_url":"https://github.com/cloud-fan","followers_url":"https://api.github.com/users/cloud-fan/followers","following_url":"https://api.github.com/users/cloud-fan/following{/other_user}","gists_url":"https://api.github.com/users/cloud-fan/gists{/gist_id}","starred_url":"https://api.github.com/users/cloud-fan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloud-fan/subscriptions","organizations_url":"https://api.github.com/users/cloud-fan/orgs","repos_url":"https://api.github.com/users/cloud-fan/repos","events_url":"https://api.github.com/users/cloud-fan/events{/privacy}","received_events_url":"https://api.github.com/users/cloud-fan/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T13:55:31Z","updated_at":"2016-09-07T13:55:31Z","body":"LGTM, merging to 1.6"}}
{"actor":{"display_login":"cloud-fan"}}