@ThreadSafe public final class HiveClientPool extends DynamicResourcePool<org.apache.hadoop.hive.metastore.IMetaStoreClient>
DynamicResourcePool.Options, DynamicResourcePool.ResourceInternal<R>mClock| Constructor and Description |
|---|
HiveClientPool(java.lang.String connectionUri,
java.lang.String hiveDbName)
Creates a new hive client client pool.
|
| Modifier and Type | Method and Description |
|---|---|
CloseableResource<org.apache.hadoop.hive.metastore.IMetaStoreClient> |
acquireClientResource() |
protected void |
closeResource(org.apache.hadoop.hive.metastore.IMetaStoreClient client) |
protected org.apache.hadoop.hive.metastore.IMetaStoreClient |
createNewResource() |
protected boolean |
isHealthy(org.apache.hadoop.hive.metastore.IMetaStoreClient client) |
protected boolean |
shouldGc(DynamicResourcePool.ResourceInternal<org.apache.hadoop.hive.metastore.IMetaStoreClient> clientResourceInternal) |
public HiveClientPool(java.lang.String connectionUri,
java.lang.String hiveDbName)
connectionUri - the connect uri for the hive metastorehiveDbName - the db name in hiveprotected void closeResource(org.apache.hadoop.hive.metastore.IMetaStoreClient client)
closeResource in class DynamicResourcePool<org.apache.hadoop.hive.metastore.IMetaStoreClient>protected org.apache.hadoop.hive.metastore.IMetaStoreClient createNewResource()
throws java.io.IOException
createNewResource in class DynamicResourcePool<org.apache.hadoop.hive.metastore.IMetaStoreClient>java.io.IOExceptionprotected boolean isHealthy(org.apache.hadoop.hive.metastore.IMetaStoreClient client)
isHealthy in class DynamicResourcePool<org.apache.hadoop.hive.metastore.IMetaStoreClient>protected boolean shouldGc(DynamicResourcePool.ResourceInternal<org.apache.hadoop.hive.metastore.IMetaStoreClient> clientResourceInternal)
shouldGc in class DynamicResourcePool<org.apache.hadoop.hive.metastore.IMetaStoreClient>public CloseableResource<org.apache.hadoop.hive.metastore.IMetaStoreClient> acquireClientResource() throws java.io.IOException
java.io.IOExceptionCopyright © 2021. All Rights Reserved.