Class CachingBlockMasterClient

  • All Implemented Interfaces:
    alluxio.Client, java.io.Closeable, java.lang.AutoCloseable

    public class CachingBlockMasterClient
    extends alluxio.worker.block.BlockMasterClient
    Use 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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class alluxio.AbstractClient

        alluxio.AbstractClient.RpcCallable<V extends java.lang.Object>
    • Field Summary

      • Fields inherited from class alluxio.AbstractClient

        mAddress, mChannel, mClosed, mConnected, mContext, mServiceVersion, mVersionService
    • 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
      • Methods inherited from class alluxio.AbstractMasterClient

        getAddress, getConfAddress
      • Methods inherited from class alluxio.AbstractClient

        afterDisconnect, beforeConnect, beforeDisconnect, checkVersion, close, connect, disconnect, getRemoteServiceVersion, isClosed, isConnected, retryRPC, retryRPC
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 configuration
        locationBlockIdList - 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:
        convertBlockListMapToProto in class alluxio.worker.block.BlockMasterClient