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

Switch to Threaded View
Hive >> mail # user >> How to connect to HiveServer 2? (Only through JDBC?)

Copy link to this message
Re:  How to connect to HiveServer 2? (Only through JDBC?)
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 <[EMAIL PROTECTED]>
发送时间:2013-06-26 21:21
主题:How to connect to HiveServer 2? (Only through JDBC?)
收件人:"user"<[EMAIL PROTECTED]>

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,