@ThreadSafe public final class RetryHandlingBlockMasterClient extends AbstractMasterClient implements BlockMasterClient
AbstractClient.RpcCallable<V>
BlockMasterClient.Factory
mAlwaysEnableTLS, 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.
|
void |
decommissionWorker(DecommissionWorkerPOptions options)
Decommission a worker.
|
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.
|
List<WorkerInfo> |
getLostWorkerInfoList()
Gets the worker information of lost 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 |
removeDisabledWorker(RemoveDisabledWorkerPOptions options)
Revert disabling a worker, enabling it to register to the cluster.
|
afterDisconnect, beforeConnect, getConfAddress, queryGrpcServerAddress
beforeDisconnect, checkVersion, close, connect, connectWithRuntimeException, createChannel, 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 List<WorkerInfo> getLostWorkerInfoList() throws IOException
BlockMasterClient
getLostWorkerInfoList
in interface BlockMasterClient
IOException
public void removeDisabledWorker(RemoveDisabledWorkerPOptions options) throws IOException
BlockMasterClient
removeDisabledWorker
in interface BlockMasterClient
options
- contains the info used to find the target worker(s)IOException
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
public void decommissionWorker(DecommissionWorkerPOptions options) throws IOException
BlockMasterClient
decommissionWorker
in interface BlockMasterClient
options
- method optionsAlluxioStatusException
- if something goes wrongIOException
Copyright © 2023. All Rights Reserved.