Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Embedding Hive

Copy link to this message
Re: Embedding Hive
You can directly embed the hive client library in your java program, and
use it without running a hive service.  My blog post at
how to run hive queries from Jython.  Something very similar
should work for Java.


On Tue, Apr 24, 2012 at 10:33 PM, Vinod Singh <[EMAIL PROTECTED]> wrote:

> Hello,
> I would like to embed Hive (client) in my application to execute a
> sequence of queries. Right now I do it using CLI (hive -f myScript.sql).
> Problem with this approach is that I do not get an return / error code to
> know the status of query programmatically.
> So my question is what is the best way to embed Hive in a Java
> application? I know JDBC is one approach but that will need Hive service
> should be running somewhere and I want to avoid that.
> Thanks,
> Vinod

Dilip Antony Joseph