@ThreadSafe public final class RetryHandlingBlockMasterClient extends AbstractMasterClient implements BlockMasterClient
AbstractClient.RpcCallable<V>
BlockMasterClient.Factory
mChannel, mClosed, mConnected, mContext, mServerAddress, mServiceVersion, mVersionService
Constructor and Description |
---|
RetryHandlingBlockMasterClient(MasterClientContext conf)
Creates a new block master client.
|
RetryHandlingBlockMasterClient(MasterClientContext conf,
InetSocketAddress address)
Creates a new block master client.
|
RetryHandlingBlockMasterClient(MasterClientContext conf,
InetSocketAddress address,
java.util.function.Supplier<RetryPolicy> retryPolicy)
Creates a new block master client.
|
Modifier and Type | Method and Description |
---|---|
protected void |
afterConnect()
This method is called after the connection is made to the remote.
|
BlockInfo |
getBlockInfo(long blockId)
Returns the
BlockInfo for a block id. |
BlockMasterInfo |
getBlockMasterInfo(Set<BlockMasterInfo.BlockMasterInfoField> fields) |
long |
getCapacityBytes()
Gets the total Alluxio capacity in bytes, on all the tiers of all the workers.
|
protected ServiceType |
getRemoteServiceType() |
protected String |
getServiceName() |
protected long |
getServiceVersion() |
long |
getUsedBytes()
Gets the total amount of used space in bytes, on all the tiers of all the workers.
|
List<WorkerInfo> |
getWorkerInfoList()
Gets the worker information of live workers(support older version Alluxio server).
|
List<WorkerLostStorageInfo> |
getWorkerLostStorage() |
List<WorkerInfo> |
getWorkerReport(GetWorkerReportOptions options)
Gets the worker information of selected workers and selected fields for report CLI.
|
void |
removeDecommissionedWorker(String workerName)
Remove the metadata of a decommissioned worker.
|
afterDisconnect, beforeConnect, getConfAddress, queryGrpcServerAddress
beforeDisconnect, checkVersion, close, connect, connectWithRuntimeException, disconnect, getRemoteHostName, getRemoteServiceVersion, getRemoteSockAddress, isClosed, isConnected, retryRPC, retryRPC
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connect, disconnect, getConfAddress, getRemoteHostName, getRemoteSockAddress, isClosed, isConnected
public RetryHandlingBlockMasterClient(MasterClientContext conf)
conf
- master client configurationpublic RetryHandlingBlockMasterClient(MasterClientContext conf, InetSocketAddress address)
conf
- master client configurationaddress
- the master address the client connects topublic RetryHandlingBlockMasterClient(MasterClientContext conf, InetSocketAddress address, java.util.function.Supplier<RetryPolicy> retryPolicy)
conf
- master client configurationaddress
- the master address the client connects toretryPolicy
- retry policy to useprotected ServiceType getRemoteServiceType()
getRemoteServiceType
in class AbstractClient
protected String getServiceName()
getServiceName
in class AbstractClient
protected long getServiceVersion()
getServiceVersion
in class AbstractClient
protected void afterConnect()
AbstractClient
afterConnect
in class AbstractClient
public List<WorkerInfo> getWorkerInfoList() throws IOException
BlockMasterClient
getWorkerInfoList
in interface BlockMasterClient
IOException
public void removeDecommissionedWorker(String workerName) throws IOException
BlockMasterClient
removeDecommissionedWorker
in interface BlockMasterClient
workerName
- contains a string, representing the workerNameIOException
public List<WorkerInfo> getWorkerReport(GetWorkerReportOptions options) throws IOException
BlockMasterClient
getWorkerReport
in interface BlockMasterClient
options
- the client defined worker and field rangesIOException
public List<WorkerLostStorageInfo> getWorkerLostStorage() throws IOException
getWorkerLostStorage
in interface BlockMasterClient
IOException
public BlockInfo getBlockInfo(long blockId) throws IOException
BlockMasterClient
BlockInfo
for a block id.getBlockInfo
in interface BlockMasterClient
blockId
- the block id to get the BlockInfo forBlockInfo
IOException
public BlockMasterInfo getBlockMasterInfo(Set<BlockMasterInfo.BlockMasterInfoField> fields) throws IOException
getBlockMasterInfo
in interface BlockMasterClient
fields
- optional list of fields to query; if null all fields will be queriedBlockMasterInfo
block master informationIOException
public long getCapacityBytes() throws IOException
BlockMasterClient
getCapacityBytes
in interface BlockMasterClient
IOException
public long getUsedBytes() throws IOException
BlockMasterClient
getUsedBytes
in interface BlockMasterClient
IOException
Copyright © 2023. All Rights Reserved.