{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/6314","labels_url":"https://api.github.com/repos/apache/spark/issues/6314/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/6314/comments","events_url":"https://api.github.com/repos/apache/spark/issues/6314/events","html_url":"https://github.com/apache/spark/pull/6314","id":78873186,"number":6314,"title":"[SPARK-7758][SQL]Override more configs to avoid failure when connect to a postgre sql","user":{"login":"WangTaoTheTonic","id":5276001,"avatar_url":"https://avatars.githubusercontent.com/u/5276001?v=3","gravatar_id":"","url":"https://api.github.com/users/WangTaoTheTonic","html_url":"https://github.com/WangTaoTheTonic","followers_url":"https://api.github.com/users/WangTaoTheTonic/followers","following_url":"https://api.github.com/users/WangTaoTheTonic/following{/other_user}","gists_url":"https://api.github.com/users/WangTaoTheTonic/gists{/gist_id}","starred_url":"https://api.github.com/users/WangTaoTheTonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WangTaoTheTonic/subscriptions","organizations_url":"https://api.github.com/users/WangTaoTheTonic/orgs","repos_url":"https://api.github.com/users/WangTaoTheTonic/repos","events_url":"https://api.github.com/users/WangTaoTheTonic/events{/privacy}","received_events_url":"https://api.github.com/users/WangTaoTheTonic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":53,"created_at":"2015-05-21T07:36:14Z","updated_at":"2015-05-22T18:48:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/6314","html_url":"https://github.com/apache/spark/pull/6314","diff_url":"https://github.com/apache/spark/pull/6314.diff","patch_url":"https://github.com/apache/spark/pull/6314.patch"},"body":"https://issues.apache.org/jira/browse/SPARK-7758\r\n\r\nWhen initializing `executionHive`, we only masks\r\n`javax.jdo.option.ConnectionURL` to override metastore location.  However,\r\nother properties that relates to the actual Hive metastore data source are not\r\nmasked.  For example, when using Spark SQL with a PostgreSQL backed Hive\r\nmetastore, `executionHive` actually tries to use settings read from\r\n`hive-site.xml`, which talks about PostgreSQL, to connect to the temporary\r\nDerby metastore, thus causes error.\r\n\r\nTo fix this, we need to mask all metastore data source properties.\r\nSpecifically, according to the code of [Hive `ObjectStore.getDataSourceProps()`\r\nmethod] [1], all properties whose name mentions \"jdo\" and \"datanucleus\" must be\r\nincluded.\r\n\r\n[1]: https://github.com/apache/hive/blob/release-0.13.1/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java#L288\r\n\r\nHave tested using postgre sql as metastore, it worked fine."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/104741852","html_url":"https://github.com/apache/spark/pull/6314#issuecomment-104741852","issue_url":"https://api.github.com/repos/apache/spark/issues/6314","id":104741852,"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-05-22T18:48:31Z","updated_at":"2015-05-22T18:48:31Z","body":"  [Test build #851 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/851/consoleFull) for   PR 6314 at commit [`ca7ae7c`](https://github.com/apache/spark/commit/ca7ae7cf2da2e810d7dad386dd58c1a9e1619f38)."}}