Hello, I sent this email to the users list a few days ago but no one there 
seems to be able to help, so I am trying the dev list.  I am working on an 
application that queries and interacts with hive using the JDBC API.  In many 
other cases, using a JDBC connection pool such as commons-dbcp or BoneCP or 
HikariCP is a recommended practice and results in much better performance.  All 
of the examples I’ve found of using accessing Hive through the JDBC API (such 
as 
https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-JDBCClientSampleCode)
 use a raw JDBC connection to Hive directly.  A few questions:

  1.  Should hive work with connection pools such as commons-dbcp, BoneCP, or 
HikariCP?
     *   Note: I have tried all BoneCP and HikariCP, and cannot seem to get 
either to work because HiveConnection.setReadOnly throws a 
java.sql.SQLException saying “Method not supported”.  I am using hive 0.14.0.
  2.  Do you recommended using a JDBC connection pool for interacting with hive 
from an application that will execute many repeated and concurrent 
queries/statements?

Also, just to be clear, I am not asking about configuring the Hive metastore to 
use a connection pool to connect to its underlying database (MySQL, PostgreSQL, 
etc), but about using a connection pool to interact with and query Hive through 
the JDBC api from an application.

Thank you,
David McWhorter

—

David McWhorter
Senior Developer, Foundations
Informatics and Technology Services
Office: 434.260.5232 | Mobile: 434.227.2551
david_mcwhor...@premierinc.com<mailto:david_mcwhor...@premierinc.com>  |  
Premier, Inc. (NASDAQ: PINC)

Reply via email to