@ThreadSafe public final class HiveClientPool extends DynamicResourcePool<org.apache.hadoop.hive.metastore.IMetaStoreClient>
DynamicResourcePool.Options, DynamicResourcePool.ResourceInternal<R>
mClock
Constructor and Description |
---|
HiveClientPool(String connectionUri,
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)
Closes the resource.
|
protected org.apache.hadoop.hive.metastore.IMetaStoreClient |
createNewResource()
Creates a new resource.
|
protected boolean |
isHealthy(org.apache.hadoop.hive.metastore.IMetaStoreClient client)
Checks whether a resource is healthy or not.
|
protected boolean |
shouldGc(DynamicResourcePool.ResourceInternal<org.apache.hadoop.hive.metastore.IMetaStoreClient> clientResourceInternal) |
protected void closeResource(org.apache.hadoop.hive.metastore.IMetaStoreClient client)
DynamicResourcePool
closeResource
in class DynamicResourcePool<org.apache.hadoop.hive.metastore.IMetaStoreClient>
client
- the resource to closeprotected org.apache.hadoop.hive.metastore.IMetaStoreClient createNewResource() throws IOException
DynamicResourcePool
createNewResource
in class DynamicResourcePool<org.apache.hadoop.hive.metastore.IMetaStoreClient>
IOException
protected boolean isHealthy(org.apache.hadoop.hive.metastore.IMetaStoreClient client)
DynamicResourcePool
isHealthy
in class DynamicResourcePool<org.apache.hadoop.hive.metastore.IMetaStoreClient>
client
- the resource to checkprotected boolean shouldGc(DynamicResourcePool.ResourceInternal<org.apache.hadoop.hive.metastore.IMetaStoreClient> clientResourceInternal)
shouldGc
in class DynamicResourcePool<org.apache.hadoop.hive.metastore.IMetaStoreClient>
clientResourceInternal
- the resource to checkpublic CloseableResource<org.apache.hadoop.hive.metastore.IMetaStoreClient> acquireClientResource() throws IOException
IOException
Copyright © 2023. All Rights Reserved.