You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Stephen Bly <st...@gmail.com> on 2015/08/07 05:22:24 UTC

Persistent (and possibly asynchronous) Hive access from within Scala

What library should I use if I want to make persistent connections from within Scala/Java? I’m working on a web service that sends Hive queries to our HiveServer (we are about to upgrade to Hive 1.1 with Hive Server 2). Right now I’m using the Hive Driver for JDBC but that does not have the capabilities we need. I found this document detailing creating a new Hive Server 2 Thrift API (https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Thrift+API <https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Thrift+API>)
but it is just a design document. Has this been implemented?
There’s also the org.apache.Hive.JDBC package, but it doesn’t seem to be well documented, and I can’t tell if it’s the same thing but with a different name. Any help would be greatly appreciated.

Re: Persistent (and possibly asynchronous) Hive access from within Scala

Posted by Stephen Bly <st...@gmail.com>.
We can use JDBC. But there’s also this new library http://hive.apache.org/javadocs/r1.1.1/api/org/apache/hive/jdbc/package-frame.html <http://hive.apache.org/javadocs/r1.1.1/api/org/apache/hive/jdbc/package-frame.html> based on this Thrift interface (https://github.com/apache/hive/blob/0af6cb42725659740a022044c6cc464ef1cf4e6b/service/if/TCLIService.thrift <https://github.com/apache/hive/blob/0af6cb42725659740a022044c6cc464ef1cf4e6b/service/if/TCLIService.thrift>) that supports sessions and async calls. But I don’t see how to use it exactly.

Re: Persistent (and possibly asynchronous) Hive access from within Scala

Posted by Jörn Franke <jo...@gmail.com>.
I have no  problems to use jdbc for hiveserver2. I think you need the
hive*jdbc*standalone.jar and i think hadoop-commons*.jar

Le ven. 7 août 2015 à 5:23, Stephen Bly <st...@gmail.com> a écrit :

> What library should I use if I want to make persistent connections from
> within Scala/Java? I’m working on a web service that sends Hive queries to
> our HiveServer (we are about to upgrade to Hive 1.1 with Hive Server 2).
> Right now I’m using the Hive Driver for JDBC but that does not have the
> capabilities we need. I found this document detailing creating a new Hive
> Server 2 Thrift API (
> https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Thrift+API)
> but it is just a design document. Has this been implemented?
> There’s also the org.apache.Hive.JDBC package, but it doesn’t seem to be
> well documented, and I can’t tell if it’s the same thing but with a
> different name. Any help would be greatly appreciated.
>