hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen Xin Yu (JIRA)" <>
Subject [jira] [Commented] (HIVE-11106) HiveServer2 JDBC (greater than v0.13.1) cannot connect to non-default database
Date Thu, 24 Sep 2015 14:32:04 GMT


Chen Xin Yu commented on HIVE-11106:

Thanks Tom Coleman. 
In my case hive metastore db is mysql.
I tried hive-jdbc-1.2.0-standalone.jar(which also compiled with hive dependent jars) and hive-jdbc-1.2.0.jar
download from It both
works for me with java application to connect hive non-default db 'testdb' by jdbc connection.

> HiveServer2 JDBC (greater than v0.13.1) cannot connect to non-default database
> ------------------------------------------------------------------------------
>                 Key: HIVE-11106
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>          Components: JDBC
>    Affects Versions: 0.14.0
>            Reporter: Tom Coleman
>            Assignee: Chen Xin Yu
> Using HiveServer 0.14.0 or greater, I cannot connect a non-default database.
> For example when connecting to HiveServer to via the following URLs, the session uses
the 'default' database, instead of the intended database.
> jdbc://localhost:10000/customDb
> This exact issue was fixed in 0.13.1 of HiveServer from
but for some reason this fix was not ported to v0.14.0 or greater. From looking at the source,
it looks as if this fix was overriden by another change to the HiveConnection class, was this
intentional or a defect reintroduced from another defect fix?
> This means that we need to use 0.13.1 in order to connect to a non-default database via
JDBC and we cannot upgrade Hive versions. We don't want placing a JDBC interceptor to inject
"use customDb" each time a connection is borrowed from the pool on production code. One should
be able to connect straight to the non-default database via the JDBC URL.
> Now it perhaps could be a simple oversight on my behalf in which the syntax to connect
to a non-default database has changed from 0.14.0 onwards but I'd be grateful is this could
be confirmed.

This message was sent by Atlassian JIRA

View raw message