@ThreadSafe public final class DefaultHiveClientPool extends AbstractHiveClientPool
DynamicResourcePool.Options, DynamicResourcePool.ResourceInternal<R>
mClock
Constructor and Description |
---|
DefaultHiveClientPool(String connectionUri)
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) |
public DefaultHiveClientPool(String connectionUri)
connectionUri
- the connect uri for the hive metastoreprotected 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
acquireClientResource
in class AbstractHiveClientPool
IOException
Copyright © 2023. All Rights Reserved.