{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/8909","labels_url":"https://api.github.com/repos/apache/spark/issues/8909/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/8909/comments","events_url":"https://api.github.com/repos/apache/spark/issues/8909/events","html_url":"https://github.com/apache/spark/pull/8909","id":108217478,"number":8909,"title":"[SPARK-10810] [WIP] [SQL] Improve session management in SQL","user":{"login":"davies","id":40902,"avatar_url":"https://avatars.githubusercontent.com/u/40902?v=3","gravatar_id":"","url":"https://api.github.com/users/davies","html_url":"https://github.com/davies","followers_url":"https://api.github.com/users/davies/followers","following_url":"https://api.github.com/users/davies/following{/other_user}","gists_url":"https://api.github.com/users/davies/gists{/gist_id}","starred_url":"https://api.github.com/users/davies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davies/subscriptions","organizations_url":"https://api.github.com/users/davies/orgs","repos_url":"https://api.github.com/users/davies/repos","events_url":"https://api.github.com/users/davies/events{/privacy}","received_events_url":"https://api.github.com/users/davies/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-24T21:26:37Z","updated_at":"2015-09-24T23:10:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/8909","html_url":"https://github.com/apache/spark/pull/8909","diff_url":"https://github.com/apache/spark/pull/8909.diff","patch_url":"https://github.com/apache/spark/pull/8909.patch"},"body":"This PR improve the sessions management by replacing the thread-local based to one SQLContext per session approach, introduce separated temporary tables and UDFs/UDAFs for each session.\r\n\r\nA new session of SQLContext could be created by:\r\n\r\n1) create an new SQLContext\r\n2) call newSession() on existing SQLContext\r\n\r\nFor HiveContext, in order to reduce the cost for each session, the classloader and Hive client are shared across multiple sessions (created by newSession).\r\n\r\nCacheManager is also shared by multiple sessions, so cache a table multiple times in different sessions will not cause multiple copies of in-memory cache.\r\n\r\nAdded jars are still shared by all the sessions, because SparkContext does not support sessions.\r\n\r\ncc @marmbrus @yhuai @rxin "},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/143073086","html_url":"https://github.com/apache/spark/pull/8909#issuecomment-143073086","issue_url":"https://api.github.com/repos/apache/spark/issues/8909","id":143073086,"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-24T23:10:04Z","updated_at":"2015-09-24T23:10:04Z","body":"  [Test build #42988 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/42988/console) for   PR 8909 at commit [`0cf26a5`](https://github.com/apache/spark/commit/0cf26a57c844bd7379e07f518555418b0b3ecefb).\n * This patch **fails to build**.\n * This patch merges cleanly.\n * This patch adds no public classes."}}