Package alluxio.stress
Class CachingBlockMasterClient
- java.lang.Object
-
- alluxio.AbstractClient
-
- alluxio.AbstractMasterClient
-
- alluxio.worker.block.BlockMasterClient
-
- alluxio.stress.CachingBlockMasterClient
-
- All Implemented Interfaces:
alluxio.Client,java.io.Closeable,java.lang.AutoCloseable
public class CachingBlockMasterClient extends alluxio.worker.block.BlockMasterClientUse this class to avoid the map-list conversion at the client side. This reduces the client side work so the time measurement for the whole RPC better reflects the time taken at the master side. Also reducing the workload on the client side will avoid the test becoming CPU-bound on the client side, when the concurrency is high.
-
-
Constructor Summary
Constructors Constructor Description CachingBlockMasterClient(alluxio.master.MasterClientContext conf, java.util.List<alluxio.grpc.LocationBlockIdListEntry> locationBlockIdList)Creates a new instance and caches the converted proto.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<alluxio.grpc.LocationBlockIdListEntry>convertBlockListMapToProto(java.util.Map<alluxio.worker.block.BlockStoreLocation,java.util.List<java.lang.Long>> blockListOnLocation)-
Methods inherited from class alluxio.worker.block.BlockMasterClient
afterConnect, commitBlock, commitBlockInUfs, getId, getRemoteServiceType, getServiceName, getServiceVersion, heartbeat, register
-
-
-
-
Constructor Detail
-
CachingBlockMasterClient
public CachingBlockMasterClient(alluxio.master.MasterClientContext conf, java.util.List<alluxio.grpc.LocationBlockIdListEntry> locationBlockIdList)Creates a new instance and caches the converted proto.- Parameters:
conf- master client configurationlocationBlockIdList- location block id list
-
-
Method Detail
-
convertBlockListMapToProto
public java.util.List<alluxio.grpc.LocationBlockIdListEntry> convertBlockListMapToProto(java.util.Map<alluxio.worker.block.BlockStoreLocation,java.util.List<java.lang.Long>> blockListOnLocation)
- Overrides:
convertBlockListMapToProtoin classalluxio.worker.block.BlockMasterClient
-
-