public class CachingBlockMasterClient extends BlockMasterClient
| Modifier and Type | Class and Description |
|---|---|
static class |
CachingBlockMasterClient.CachingBlockMapIterator
Pre-generate the list so the RPC execution time does not include the conversion time.
|
AbstractClient.RpcCallable<V>| Modifier and Type | Field and Description |
|---|---|
CachingBlockMasterClient.CachingBlockMapIterator |
mBlockBatchIterator |
mAsyncClient, mClientmAddress, mChannel, mClosed, mConnected, mContext, mServiceVersion, mVersionService| Constructor and Description |
|---|
CachingBlockMasterClient(MasterClientContext conf,
java.util.List<LocationBlockIdListEntry> locationBlockIdList)
Creates a new instance and caches the converted proto.
|
CachingBlockMasterClient(MasterClientContext conf,
java.util.Map<BlockStoreLocation,java.util.List<java.lang.Long>> blockMap)
Creates a new instance and caches the converted proto.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<LocationBlockIdListEntry> |
convertBlockListMapToProto(java.util.Map<BlockStoreLocation,java.util.List<java.lang.Long>> blockListOnLocation) |
void |
registerWithStream(long workerId,
java.util.List<java.lang.String> storageTierAliases,
java.util.Map<java.lang.String,java.lang.Long> totalBytesOnTiers,
java.util.Map<java.lang.String,java.lang.Long> usedBytesOnTiers,
java.util.Map<BlockStoreLocation,java.util.List<java.lang.Long>> currentBlocksOnLocation,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> lostStorage,
java.util.List<ConfigProperty> configList) |
acquireRegisterLeaseWithBackoff, afterConnect, commitBlock, commitBlockInUfs, getId, getRemoteServiceType, getServiceName, getServiceVersion, heartbeat, registergetAddress, getConfAddressafterDisconnect, beforeConnect, beforeDisconnect, checkVersion, close, connect, disconnect, getRemoteServiceVersion, isClosed, isConnected, retryRPC, retryRPCpublic CachingBlockMasterClient.CachingBlockMapIterator mBlockBatchIterator
public CachingBlockMasterClient(MasterClientContext conf, java.util.List<LocationBlockIdListEntry> locationBlockIdList)
conf - master client configurationlocationBlockIdList - location block id listpublic CachingBlockMasterClient(MasterClientContext conf, java.util.Map<BlockStoreLocation,java.util.List<java.lang.Long>> blockMap)
conf - master client configurationblockMap - block lists of each locationpublic java.util.List<LocationBlockIdListEntry> convertBlockListMapToProto(java.util.Map<BlockStoreLocation,java.util.List<java.lang.Long>> blockListOnLocation)
convertBlockListMapToProto in class BlockMasterClientpublic void registerWithStream(long workerId,
java.util.List<java.lang.String> storageTierAliases,
java.util.Map<java.lang.String,java.lang.Long> totalBytesOnTiers,
java.util.Map<java.lang.String,java.lang.Long> usedBytesOnTiers,
java.util.Map<BlockStoreLocation,java.util.List<java.lang.Long>> currentBlocksOnLocation,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> lostStorage,
java.util.List<ConfigProperty> configList)
throws java.io.IOException
registerWithStream in class BlockMasterClientjava.io.IOExceptionCopyright © 2021. All Rights Reserved.