hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garg, Rinku" <Rinku.G...@fisglobal.com>
Subject RE: Setting | Verifying | Hive Query Parameters from Java
Date Thu, 06 Mar 2014 11:12:52 GMT
Hi All,

Can anybody help me on below mail trail.

Thanks
Rinku Garg

From: Garg, Rinku
Sent: Tuesday, March 04, 2014 5:14 PM
To: user@hive.apache.org
Subject: Setting | Verifying | Hive Query Parameters from Java

Hi All,

We have installed CDH4.2.0 and hive-0.10.0-cdh4.2.0. Both are working as desired.

We need to set hive configuration parameter from Java while making JDBC connection.

We have written a java program to execute queries on hive server with some configurations
properties setting dynamically . We are doing it as below

                CONNECTION_URL=jdbc:hive://master149:10000/default

Next, we are doing following method to set properties through java

props.setProperty(hive.server2.async.exec.threads,50);
props.setProperty(hive.server2.thrift.max.worker.threads,500);
props.setProperty(hive.groupby.orderby.position.alias,false);

and a hive connection is made as given below

hiveConnection = DriverManager.getConnection(connectionURL,props);

by above steps when a hive connection is made using hive-jdbc and we are getting hive query
results as desired.

QUERY:


1.       Are we doing rightly for setting up the hive properties, if yes then how can we verify
that?

2.       If the above is not the right way, then how can we achieve setting hive configuration
parameters from Java using JDBC?

Thanks
Rinku Garg

_____________
The information contained in this message is proprietary and/or confidential. If you are not
the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose,
distribute or use the message in any manner; and (iii) notify the sender immediately. In addition,
please be aware that any message addressed to our domain is subject to archiving and review
by persons other than the intended recipient. Thank you.

Mime
View raw message