Class RpcBenchPreparationUtils


  • public class RpcBenchPreparationUtils
    extends java.lang.Object
    Utilities for the preparation step in RPC benchmark testing.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static alluxio.worker.block.BlockStoreLocation BLOCK_LOCATION_MEM  
      static long CAPACITY  
      static java.util.Map<java.lang.String,​java.lang.Long> CAPACITY_MEM  
      static java.util.List<alluxio.grpc.ConfigProperty> EMPTY_CONFIG  
      static java.util.Map<java.lang.String,​java.util.List<java.lang.String>> LOST_STORAGE  
      static java.util.Map<java.lang.String,​java.lang.Long> USED_MEM_EMPTY  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<alluxio.worker.block.BlockStoreLocation,​java.util.List<java.lang.Long>> generateBlockIdOnTiers​(java.util.Map<alluxio.stress.rpc.TierAlias,​java.util.List<java.lang.Integer>> tiersConfig)
      Generates block IDs according to the storage tier/dir setup.
      static void prepareBlocksInMaster​(java.util.Map<alluxio.worker.block.BlockStoreLocation,​java.util.List<java.lang.Long>> locToBlocks)
      Prepare all relevant block IDs on the master side concurrently.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CAPACITY_MEM

        public static final java.util.Map<java.lang.String,​java.lang.Long> CAPACITY_MEM
      • USED_MEM_EMPTY

        public static final java.util.Map<java.lang.String,​java.lang.Long> USED_MEM_EMPTY
      • BLOCK_LOCATION_MEM

        public static final alluxio.worker.block.BlockStoreLocation BLOCK_LOCATION_MEM
      • LOST_STORAGE

        public static final java.util.Map<java.lang.String,​java.util.List<java.lang.String>> LOST_STORAGE
      • EMPTY_CONFIG

        public static final java.util.List<alluxio.grpc.ConfigProperty> EMPTY_CONFIG
    • Method Detail

      • prepareBlocksInMaster

        public static void prepareBlocksInMaster​(java.util.Map<alluxio.worker.block.BlockStoreLocation,​java.util.List<java.lang.Long>> locToBlocks)
                                          throws java.lang.InterruptedException
        Prepare all relevant block IDs on the master side concurrently.
        Parameters:
        locToBlocks - a map from block location to block IDs
        Throws:
        java.lang.InterruptedException
      • generateBlockIdOnTiers

        public static java.util.Map<alluxio.worker.block.BlockStoreLocation,​java.util.List<java.lang.Long>> generateBlockIdOnTiers​(java.util.Map<alluxio.stress.rpc.TierAlias,​java.util.List<java.lang.Integer>> tiersConfig)
        Generates block IDs according to the storage tier/dir setup. In order to avoid block ID colliding with existing blocks, this will generate IDs decreasingly from the Long.MAX_VALUE.
        Parameters:
        tiersConfig - the tier/dir block counts
        Returns:
        a map of location to generated block lists