Class TestServerSideScanMetricsFromClientSide

java.lang.Object
org.apache.hadoop.hbase.TestServerSideScanMetricsFromClientSide

@Tag("org.apache.hadoop.hbase.testclassification.LargeTests") public class TestServerSideScanMetricsFromClientSide extends Object
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • TEST_UTIL

      private static final HBaseTestingUtil TEST_UTIL
    • TABLE

      private static org.apache.hadoop.hbase.client.Table TABLE
    • TABLE_NAME

      private static org.apache.hadoop.hbase.TableName TABLE_NAME
      Table configuration
    • NUM_ROWS

      private static int NUM_ROWS
    • ROW

      private static byte[] ROW
    • ROWS

      private static byte[][] ROWS
    • NUM_FAMILIES

      private static int NUM_FAMILIES
    • FAMILY

      private static byte[] FAMILY
    • FAMILIES

      private static byte[][] FAMILIES
    • NUM_QUALIFIERS

      private static int NUM_QUALIFIERS
    • QUALIFIER

      private static byte[] QUALIFIER
    • QUALIFIERS

      private static byte[][] QUALIFIERS
    • VALUE_SIZE

      private static int VALUE_SIZE
    • VALUE

      private static byte[] VALUE
    • NUM_COLS

      private static int NUM_COLS
    • CELL_HEAP_SIZE

      private static long CELL_HEAP_SIZE
  • Constructor Details

  • Method Details

    • setUpBeforeClass

      @BeforeAll public static void setUpBeforeClass() throws Exception
      Throws:
      Exception
    • createTestTable

      private static org.apache.hadoop.hbase.client.Table createTestTable(org.apache.hadoop.hbase.TableName name, byte[][] rows, byte[][] families, byte[][] qualifiers, byte[] cellValue) throws IOException
      Throws:
      IOException
    • tearDownAfterClass

      @AfterAll public static void tearDownAfterClass() throws Exception
      Throws:
      Exception
    • createPuts

      private static ArrayList<org.apache.hadoop.hbase.client.Put> createPuts(byte[][] rows, byte[][] families, byte[][] qualifiers, byte[] value) throws IOException
      Make puts to put the input value into each combination of row, family, and qualifier
      Parameters:
      rows - the rows to use
      families - the column families to use
      qualifiers - the column qualifiers to use
      value - the value to put
      Returns:
      the putted input values added in puts
      Throws:
      IOException - If an IO problem is encountered
    • getCellHeapSize

      private long getCellHeapSize() throws Exception
      Returns:
      The approximate heap size of a cell in the test table. All cells should have approximately the same heap size, so the value is cached to avoid repeating the calculation
      Throws:
      Exception - on unexpected failure
    • testRowsSeenMetric

      @Test public void testRowsSeenMetric() throws Exception
      Throws:
      Exception
    • testFsReadTimeMetric

      @Test public void testFsReadTimeMetric() throws Exception
      Throws:
      Exception
    • testRowsSeenMetric

      private void testRowsSeenMetric(org.apache.hadoop.hbase.client.Scan baseScan) throws Exception
      Throws:
      Exception
    • testRowsFilteredMetric

      @Test public void testRowsFilteredMetric() throws Exception
      Throws:
      Exception
    • testRowsFilteredMetric

      private void testRowsFilteredMetric(org.apache.hadoop.hbase.client.Scan baseScan) throws Exception
      Throws:
      Exception
    • testRowsFilteredMetric

      private void testRowsFilteredMetric(org.apache.hadoop.hbase.client.Scan baseScan, org.apache.hadoop.hbase.filter.Filter filter, int expectedNumFiltered) throws Exception
      Throws:
      Exception
    • testMetric

      private void testMetric(org.apache.hadoop.hbase.client.Scan scan, String metricKey, long expectedValue) throws Exception
      Run the scan to completetion and check the metric against the specified value
      Parameters:
      scan - The scan instance to use to record metrics
      metricKey - The metric key name
      expectedValue - The expected value of metric
      Throws:
      Exception - on unexpected failure
    • testMetric

      private void testMetric(org.apache.hadoop.hbase.client.Scan scan, String metricKey, long expectedValue, org.apache.hadoop.hbase.CompareOperator compareOperator) throws Exception
      Throws:
      Exception