Use this suffix for obtaining snapshot transaction enabled connections for consistency and to disable sharing snapshot and non-snapshot enabled pools.
To be invoked only on SparkContext stop or from tests (or LDAP refresh).
Utility method to get the connection from DataSource returned by
getPoolDataSource
.
Utility method to get the connection from DataSource returned by
getPoolDataSource
.
getPoolDataSource
Get a pooled DataSource for a given ID, pool properties and connection properties.
Get a pooled DataSource for a given ID, pool properties and connection properties. Currently two pool implementations are supported namely Tomcat-JDBC pool and HikariCP implementation which is selected by an optional boolean argument (default is false i.e. tomcat pool).
It is assumed and required that the set of pool properties, connection properties (and whether tomcat or hikari pool is to be used) are provided as identical for the same ID.
an ID for a pool that will shared by all requests against the same id (e.g. the table name can be the ID for an external table)
map of pool properties to their values; the key can be either
PoolProperty.Type
or a string (as in Tomcat or Hikari)
set of any additional connection properties
if true then use HikariCP else Tomcat-JDBC pool implementation; default is false i.e. Tomcat pool
Remove reference to the pool for given ID.
Remove reference to the pool for given ID. Also will cleanup and remove the pool if all the references have been removed.
true if this was the last reference and entire pool was removed and false otherwise
A global way to obtain a pooled DataSource with a given set of pool and connection properties.
Supports Tomcat-JDBC pool and HikariCP.