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]>
主题：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?