hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kentkong_work"<>
Subject Re: How to connect to HiveServer 2? (Only through JDBC?)
Date Wed, 26 Jun 2013 14:08:47 GMT
haha, I sent the same question a few days before, no response yet.
but I find a way to operate hive remotely

use Jsch framework to ssh on the hive machine, and execute whatever sql by using "hive -e
select ... &", then the query will run background.
if you want to know when the query finished, a little complexity, 
use Jsch to execute "hive -e select ... >> result.csv &"
start a thread, use Jsch to execute "mv result.csv result.c" every 3 mins, you can know if
the mv successful by call Jsch API
if success, then the query ends 



发件人:Christian Schneider <>
发送时间:2013-06-26 21:21
主题:How to connect to HiveServer 2? (Only through JDBC?)

is JDBC the only way to connect to HiveServer 2?

I can't find any documentation how to do it with java?

There is a Thrift port open, but how to use that?

Best Regards,
View raw message