[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user liancheng closed the pull request at: https://github.com/apache/spark/pull/9911 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user KaiXinXiaoLei commented on a diff in the pull request: https://github.com/apache/spark/pull/9911#discussion_r48445836 --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientInterface.scala --- @@ -189,4 +191,6 @@ private[hive] trait ClientInterface { /** Used for testing only. Removes all metadata from this instance of Hive. */ def reset(): Unit + + def client: Hive --- End diff -- @liancheng I thinks `def client: Hive` is not need. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user KaiXinXiaoLei commented on the pull request: https://github.com/apache/spark/pull/9911#issuecomment-167294826 @liancheng I use your code and build. Then run "sbin/start-thriftserver.sh" failed. the error info is as fellow: 15/12/26 16:28:27 INFO ClientWrapper: Loaded org.apache.hadoop.hive.shims.Hadoop23Shims for Hadoop version 2.6.0 Exception in thread "main" java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/spark/sql/hive/client/IsolatedClientLoader$$anon$1) previously initiated loading for a different type with name "org/apache/hadoop/hive/ql/metadata/Hive" at java.lang.ClassLoader.defineClass1(Native Method) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user yhuai commented on the pull request: https://github.com/apache/spark/pull/9911#issuecomment-161452745 I guess the fundamental issue is when we `HiveSessionImpl`'s `getMetaStoreClient` is called. Right now, I see the following. ![image](https://cloud.githubusercontent.com/assets/2072857/11546020/8e119514-98ff-11e5-82fa-1a2f59ff041f.png) Basically, getFunction may require executionHive or metadataHive. I think other methods require metadataHive. I think to fundamentally solve the problem, we need to somehow control these metastore clients. Or, have a way to make sure they talk to the right metastore. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user yhuai commented on a diff in the pull request: https://github.com/apache/spark/pull/9911#discussion_r46475735 --- Diff: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIService.scala --- @@ -70,6 +70,77 @@ private[hive] class SparkSQLCLIService(hiveServer: HiveServer2, hiveContext: Hiv case _ => super.getInfo(sessionHandle, getInfoType) } } + + private def withMetadataHive[T](sessionHandle: SessionHandle)(f: => T): T = { +val sessionConf = sparkSqlSessionManager.getSession(sessionHandle).getHiveConf --- End diff -- In our own session manager, do we maintain a map from session handle to hive conf for metadata hive? Right now, the HiveSession associated with a session handle stores hive conf of the execution hive. Also, how does set command work? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/9911#issuecomment-161147150 **[Test build #47024 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47024/consoleFull)** for PR 9911 at commit [`054df0f`](https://github.com/apache/spark/commit/054df0f33e391e1bfe05f5f4e23e30068fa21727). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/9911#issuecomment-161160039 Merged build finished. Test FAILed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/9911#issuecomment-161159979 **[Test build #47024 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/47024/consoleFull)** for PR 9911 at commit [`054df0f`](https://github.com/apache/spark/commit/054df0f33e391e1bfe05f5f4e23e30068fa21727). * This patch **fails Spark unit tests**. * This patch merges cleanly. * This patch adds no public classes. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/9911#issuecomment-161160040 Test FAILed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/47024/ Test FAILed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
GitHub user liancheng opened a pull request: https://github.com/apache/spark/pull/9911 [WIP][SPARK-9686][SQL] Redirect JDBC metadata calls to Spark SQL metadata Hive client This PR is based on the patch @navis provided in [SPARK-9686][1]. Basically, it overrides all JDBC metadata related methods in `SparkSQLCLIService`, overrides session `HiveConf` with proper configurations, and wraps the original calls with `hiveContext.metadataHive.withHiveState`, so that metadata stored in the real Hive metastore can be retrieved. Unfortunately, both @navis and I observed that this approach doesn't play well with embedded metastore, because Hive somehow tries to establish multiple connections to the local Derby metastore database while Derby doesn't support multi-connection. I've being digging this for a while, but failed to figure out a valid fix/workaround for this issue. (So the test case added in this PR doesn't pass.) My impression is that, somehow the `HiveMetaStoreClient` belongs to metadata Hive client got a snapshot of the `HiveConf` of the execution Hive client, thus makes Hive try to establish a new connection instead of reusing the existing connection because this `HiveConf` is considered to be "[incompatible][2]" with the session `HiveConf`. [1]: https://issues.apache.org/jira/browse/SPARK-9686 [2]: https://github.com/apache/hive/blob/release-1.2.1/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java#L279-L297 You can merge this pull request into a Git repository by running: $ git pull https://github.com/liancheng/spark spark-9686.jdbc-metadata Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/9911.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #9911 commit 65aa390e5fc60fc7da7dcc83a7ef0033c7795db7 Author: Cheng LianDate: 2015-11-21T09:10:12Z WIP --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/9911#issuecomment-158990791 **[Test build #46539 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/46539/consoleFull)** for PR 9911 at commit [`65aa390`](https://github.com/apache/spark/commit/65aa390e5fc60fc7da7dcc83a7ef0033c7795db7). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user SparkQA commented on the pull request: https://github.com/apache/spark/pull/9911#issuecomment-159011485 **[Test build #46539 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/46539/consoleFull)** for PR 9911 at commit [`65aa390`](https://github.com/apache/spark/commit/65aa390e5fc60fc7da7dcc83a7ef0033c7795db7). * This patch **fails Spark unit tests**. * This patch merges cleanly. * This patch adds no public classes. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/9911#issuecomment-159011554 Merged build finished. Test FAILed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request: [WIP][SPARK-9686][SQL] Redirect JDBC metadata ...
Github user AmplabJenkins commented on the pull request: https://github.com/apache/spark/pull/9911#issuecomment-159011557 Test FAILed. Refer to this link for build results (access rights to CI server needed): https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/46539/ Test FAILed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org