Support Questions
Find answers, ask questions, and share your expertise

HIVE JDBC dont support set

Expert Contributor

i'd like to set LZO for the sepcific connection, but it seems hive JDBC dont support this kind method.   and search from google, didnt find anything.

 

my java jdbc code like:  set xxxx=true; set xxxx=ture; <Query String>.  some of my team member told me java JDBC don't support "set" in JDBC.

 

just one question,  dose beeline or cli mode suport java language ?  if yes, i can change my code to use beeline or cli. i have found some informations from hive documents, there are java API for cli or beeline, but i am not sure it works or not , anyone has this experience?

 

beeline
A console SQL shell with command completion.
cli
Hive Commandline
common
Hive Common Utilities and Definitions
contrib
Hive Contrib package
hbase-handler
Hive HBase StorageHandler
hwi
Hive Web Interface
jdbc
Hive JDBC
metastore
Hive Metastore
ql
Hive Query Language
serde
Hive Serializers/Deserializers
service
Hive Service
testutils
Testutils

 

3 REPLIES 3

Expert Contributor

mission failed, i have tried many tims today, can't connect to hive server by cli API.

Expert Contributor

have tried many ways, but failed. at last i use JAVA to connect HIVE server by SSH and execute coomand like hive -e .

 

Contributor

Set is supported.  You can do it by executing it on a statement, like:

 

Statement stmt1 = con1.createStatement();

stmt1.execute("set hive.exec.compress.output=true");

 

Hope that helps,

Szehon