Package org.apache.hadoop.hbase
Class TestServerSideScanMetricsFromClientSide
java.lang.Object
org.apache.hadoop.hbase.TestServerSideScanMetricsFromClientSide
-
Field Summary
Modifier and TypeFieldDescriptionprivate static long
static final HBaseClassTestRule
private static byte[][]
private static byte[]
private static final org.slf4j.Logger
private static int
private static int
private static int
private static int
private static byte[]
private static byte[][]
private static byte[]
private static byte[][]
private static org.apache.hadoop.hbase.client.Table
private static org.apache.hadoop.hbase.TableName
Table configurationprivate static final HBaseTestingUtility
private static byte[]
private static int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) static ArrayList<org.apache.hadoop.hbase.client.Put>
createPuts
(byte[][] rows, byte[][] families, byte[][] qualifiers, byte[] value) Make puts to put the input value into each combination of row, family, and qualifier(package private) static org.apache.hadoop.hbase.client.Table
createTestTable
(org.apache.hadoop.hbase.TableName name, byte[][] rows, byte[][] families, byte[][] qualifiers, byte[] cellValue) private long
static void
static void
void
void
testMetric
(org.apache.hadoop.hbase.client.Scan scan, String metricKey, long expectedValue) Run the scan to completion and check the metric against the specified valueprivate void
testMetric
(org.apache.hadoop.hbase.client.Scan scan, String metricKey, long expectedValue, org.apache.hadoop.hbase.CompareOperator compareOperator) void
void
testRowsFilteredMetric
(org.apache.hadoop.hbase.client.Scan baseScan) void
testRowsFilteredMetric
(org.apache.hadoop.hbase.client.Scan baseScan, org.apache.hadoop.hbase.filter.Filter filter, int expectedNumFiltered) private void
testRowsSeenMetric
(boolean async) void
testRowsSeenMetric
(org.apache.hadoop.hbase.client.Scan baseScan) void
void
-
Field Details
-
LOG
-
CLASS_RULE
-
TEST_UTIL
-
TABLE
-
TABLE_NAME
Table configuration -
NUM_ROWS
-
ROW
-
ROWS
-
NUM_FAMILIES
-
FAMILY
-
FAMILIES
-
NUM_QUALIFIERS
-
QUALIFIER
-
QUALIFIERS
-
VALUE_SIZE
-
VALUE
-
NUM_COLS
-
CELL_HEAP_SIZE
-
-
Constructor Details
-
TestServerSideScanMetricsFromClientSide
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
createTestTable
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
- Throws:
Exception
-
createPuts
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 usefamilies
- the column families to usequalifiers
- the column qualifiers to usevalue
- the value to put- Returns:
- the putted input values added in puts
- Throws:
IOException
- If an IO problem is encountered
-
getCellHeapSize
- 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
-
testRowsSeenMetricWithSync
- Throws:
Exception
-
testRowsSeenMetricWithAsync
- Throws:
Exception
-
testRowsSeenMetric
- Throws:
Exception
-
testFsReadTimeMetric
- Throws:
Exception
-
testRowsSeenMetric
- Throws:
Exception
-
testRowsFilteredMetric
- Throws:
Exception
-
testRowsFilteredMetric
- Throws:
Exception
-
testRowsFilteredMetric
public void testRowsFilteredMetric(org.apache.hadoop.hbase.client.Scan baseScan, org.apache.hadoop.hbase.filter.Filter filter, int expectedNumFiltered) throws Exception - Throws:
Exception
-
testMetric
public void testMetric(org.apache.hadoop.hbase.client.Scan scan, String metricKey, long expectedValue) throws Exception Run the scan to completion and check the metric against the specified value- Parameters:
scan
- The scan instance to use to record metricsmetricKey
- The metric key nameexpectedValue
- 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
-