@ThreadSafe public final class BlockWorkerClientPool extends DynamicResourcePool<BlockWorkerClient>
DynamicResourcePool.acquire(), DynamicResourcePool.release(Object) must be called
when the thread is done using the client.DynamicResourcePool.Options, DynamicResourcePool.ResourceInternal<R>mClock| Constructor and Description |
|---|
BlockWorkerClientPool(UserState userState,
GrpcServerAddress address,
int minCapacity,
int maxCapacity,
AlluxioConfiguration alluxioConf)
Creates a new block master client pool.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeResource(BlockWorkerClient client) |
protected BlockWorkerClient |
createNewResource() |
protected com.codahale.metrics.Counter |
getMetricCounter() |
protected boolean |
isHealthy(BlockWorkerClient client)
Checks whether a client is healthy.
|
protected boolean |
shouldGc(DynamicResourcePool.ResourceInternal<BlockWorkerClient> clientResourceInternal) |
public BlockWorkerClientPool(UserState userState, GrpcServerAddress address, int minCapacity, int maxCapacity, AlluxioConfiguration alluxioConf)
userState - the parent userStateaddress - address of the workerminCapacity - the minimum capacity of the poolmaxCapacity - the maximum capacity of the poolalluxioConf - Alluxio configurationprotected void closeResource(BlockWorkerClient client) throws java.io.IOException
closeResource in class DynamicResourcePool<BlockWorkerClient>java.io.IOExceptionprotected BlockWorkerClient createNewResource() throws java.io.IOException
createNewResource in class DynamicResourcePool<BlockWorkerClient>java.io.IOExceptionprotected boolean isHealthy(BlockWorkerClient client)
isHealthy in class DynamicResourcePool<BlockWorkerClient>client - the client to checkprotected com.codahale.metrics.Counter getMetricCounter()
getMetricCounter in class DynamicResourcePool<BlockWorkerClient>protected boolean shouldGc(DynamicResourcePool.ResourceInternal<BlockWorkerClient> clientResourceInternal)
shouldGc in class DynamicResourcePool<BlockWorkerClient>Copyright © 2022. All Rights Reserved.