Class TestStoreFileTableSkewCostFunction

java.lang.Object
org.apache.hadoop.hbase.master.balancer.TestStoreFileTableSkewCostFunction

  • Field Details

  • Constructor Details

  • Method Details

    • testUniformDistribution

      public void testUniformDistribution()
      Tests that a uniform store file distribution (single table) across servers results in zero cost.
    • testSkewedDistribution

      public void testSkewedDistribution()
      Tests that a skewed store file distribution (single table) results in a positive cost.
    • testEmptyDistribution

      public void testEmptyDistribution()
      Tests that an empty cluster (no servers/regions) is handled gracefully.
    • testMultipleTablesDistribution

      Tests that having multiple tables results in a positive cost when each table's regions are not balanced across servers – even if the overall load per server is balanced.
    • createMockRegionInfo

      private static org.apache.hadoop.hbase.client.RegionInfo createMockRegionInfo(int storeFileSizeMb)
      Helper method to create a RegionInfo for the default table with the given store file size.
    • createMockRegionInfo

      private static org.apache.hadoop.hbase.client.RegionInfo createMockRegionInfo(org.apache.hadoop.hbase.TableName table, int storeFileSizeMb)
      Helper method to create a RegionInfo for a specified table with the given store file size.
    • generateRandomByteArray

      private static byte[] generateRandomByteArray(int n)
    • createMockRegionMetrics

      private static org.apache.hadoop.hbase.RegionMetrics createMockRegionMetrics(org.apache.hadoop.hbase.client.RegionInfo regionInfo)
      Creates a mocked RegionMetrics for the given region.