Hive connection pooling mechanism - hadoop

I am using hive 2.1.0 version.
I have a jdbc connection from java side to connect to hive server2. But now i need to create a jdbc connection once and create a datasource pool so that the multiple queries do not create a new connection everytime and use the pooling mechanism instead. Is there any way to implement the pooling mechanism in hive?
Thanks in advance...

Related

Quarkus reactive and JDBC datasource connection pooling

I'm using Quarkus and have a project with two default datasources connecting to the same database, one uses JDBC (Agroal) for a postgres copy operation, the other uses reactive (PgPool) for all other sql operations.
There's an option in quarkus QUARKUS_DATASOURCE_JDBC_POOLING_ENABLED that can be set to false to disable connection pooling for JDBC datasource. So my question is:
Does reactive and JDBC datasources share the same connection pool? If I disable the JDBC pooling, will it affect the reactive connection pool?
Is there a way to verify such behavior?
Thank you all.
Trying to figure out the behavior between reactive and JDBC datasource regarding connection pooling. Expecting that turning off the pooling for JDBC via the config QUARKUS_DATASOURCE_JDBC_POOLING_ENABLED will not impact reactive connection pool.

Kafka Connect JDBC Connector | Closing JDBC Connection after each poll

We are going to use use Kafka Connect JDBC Source Connector to ingest data from Oracle Databases.
We have one Kafka JDBC Connector per one Oracle Db.
Looking at the JDBC Connector implementation ,if we have N number of maxTasks per Connector (inside CachedConnectionProvider), there will be N number of JDBC Connections to the server.
These connections are kept alive and will not be closed after each poll().
Our DB Admins have strict conditions about number of live connections to the db servers.
Because of this, we are thinking of closing the JDBC Connection after each poll() since our poll times are usually 10 mins or more.
Is this supported natively by JDBC Connector or do we have to do a patch?

Apache Ignite JDBC driver - JDBC Connection Pool options

I'm currently trying to set-up Apache Ignite with C3P0 as my JDBC Connection pool, but I noticed that since the Ignite driver doesn't support transactions, C3P0's not usable.
Has anyone had any luck getting a JDBC connection pool going with the Ignite driver? Suggestions?
EDIT:
Updating with exactly why C3P0 doesn't work with Ignite's JDBC Driver
So take a look at this line of code
To create a new pooled connection, C3P0 attempts to set transaction isolation through the connection/driver.
That eventually leads us to this line of code in the Ignite driver, which basically tells us that the Ignite driver doesn't support SQL transactions.
Ignite itself DOES support transactions as specified here but it appears the JDBC implementation does not.
So I need an alternative to C3P0 if I want to set up a JDBC connection pool; any suggestions?
It turns out the JDBC driver for Apache Ignite isn't currently JDBC compliant. Specifically the part that breaks it is that it doesn't have transaction support. As a result, your typical JDBC-pool implementation won't work with the Ignite Driver
There's now a ticket for this here: https://issues.apache.org/jira/browse/IGNITE-4191
BasicDataSource ds = new BasicDataSource();
ds.setDriverClassName("org.apache.ignite.IgniteJdbcDriver");
ds.setUrl("jdbc:ignite:cfg://cache=default#file:///the/path/to/ignite-config.xml");
ds.setInitialSize(2);
ds.setMinIdle(2);
Try BasicDataSource http://commons.apache.org/proper/commons-dbcp/configuration.html

MysqlConnectionPoolDataSource or c3p0 like library?

What's the difference between MysqlConnectionPoolDataSource and C3p0, BoneCP or dbcp library for connection pooling? I don't understand why use a library if mysql connector give connection pooling.
A ConnectionPoolDataSource is not a connection pool (or at least: it shouldn't be), it is intended to be used by a DataSource that provides pooling (eg from an application server). A ConnectionPoolDataSource provides the physical connections that will be held in the connection pool. Besides creating those physical connections a ConnectionPoolDataSource shouldn't do anything else.
So if you are working in an application server, use the pooling provided by the DataSources of the application server. If you are in a standalone application or a server that doesn't provide datasources on its own, use third party connection pools like BoneCP, c3p0 or Apache DBCP. If MySQL also provides a normal DataSource that provides pooling, then you could use that.

Oracle OCI Connection Pooling vs Oracle UCP

Oracle offers 4 different JDBC connection pooling mechanisms when the OCI driver is used for JDBC connections:
Oracle DataSource
Oracle OCI Connection Pooling
Oracle UCP (Universal connection pooling -recommended over OracleDataSource)
Oracle Database Resident Connection pooling
What are the pros and cons of using Oracle UCP (Universal Connection Pooling) as compared to Oracle OCI Connection Pooling provided by the OCI driver?
I will try adding some details based on the reading I have done so far.
Below are some distinct features supported by the different connection pooling mechanisms
Oracle UCP (Universal Connection Pooling)
a. Supports features like Fast Connection Failover (FCF), Runtime connection load balancing and connection affinity.
b. JMX Support
c. Support for labelling connections
d. Support for connection harvesting
OCI (Oracle Call Interface) Connection Pooling
a. Support for session multiplexing.
OracleDataSource
a. Implicit connection cache.

Resources