public class CachingBlockMasterClient extends BlockMasterClient
AbstractClient.RpcCallable<V>
mAddress, mChannel, mClosed, mConnected, mContext, mServiceVersion, mVersionService
Constructor and Description |
---|
CachingBlockMasterClient(MasterClientContext conf,
List<LocationBlockIdListEntry> locationBlockIdList)
Creates a new instance and caches the converted proto.
|
Modifier and Type | Method and Description |
---|---|
List<LocationBlockIdListEntry> |
convertBlockListMapToProto(Map<BlockStoreLocation,List<Long>> blockListOnLocation)
Converts the block list map to a proto list.
|
afterConnect, commitBlock, commitBlockInUfs, getId, getRemoteServiceType, getServiceName, getServiceVersion, heartbeat, register
getAddress, getConfAddress
afterDisconnect, beforeConnect, beforeDisconnect, checkVersion, close, connect, disconnect, getRemoteServiceVersion, isClosed, isConnected, retryRPC, retryRPC
public CachingBlockMasterClient(MasterClientContext conf, List<LocationBlockIdListEntry> locationBlockIdList)
conf
- master client configurationlocationBlockIdList
- location block id listpublic List<LocationBlockIdListEntry> convertBlockListMapToProto(Map<BlockStoreLocation,List<Long>> blockListOnLocation)
BlockMasterClient
LocationBlockIdListEntry
instances shall have the same BlockStoreLocationProto
.
The uniqueness of BlockStoreLocationProto
is determined by tier alias and medium type.
That means directories with the same tier alias and medium type will be merged into the same
LocationBlockIdListEntry
.convertBlockListMapToProto
in class BlockMasterClient
blockListOnLocation
- a map from block location to the block listCopyright © 2023. All Rights Reserved.