Class TestServerSideScanMetricsFromClientSide

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

  • Field Details

  • Constructor Details

  • Method Details

    • setUpBeforeClass

      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

      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

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

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

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

      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