Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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
http://csgrad.blogspot.com/2010/04/to-use-language-other-than-java-say.htmldescribes
how to run hive queries from Jython.  Something very similar
should work for Java.

Dilip

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
http://csgrad.blogspot.com
http://www.marydilip.info
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB