public class TestServerSideScanMetricsFromClientSide extends Object
Modifier and Type | Field and Description |
---|---|
private static long |
CELL_HEAP_SIZE |
static HBaseClassTestRule |
CLASS_RULE |
private static byte[][] |
FAMILIES |
private static byte[] |
FAMILY |
private static org.slf4j.Logger |
LOG |
private static int |
NUM_COLS |
private static int |
NUM_FAMILIES |
private static int |
NUM_QUALIFIERS |
private static int |
NUM_ROWS |
private static byte[] |
QUALIFIER |
private static byte[][] |
QUALIFIERS |
private static byte[] |
ROW |
private static byte[][] |
ROWS |
private static org.apache.hadoop.hbase.client.Table |
TABLE |
private static org.apache.hadoop.hbase.TableName |
TABLE_NAME
Table configuration
|
private static HBaseTestingUtility |
TEST_UTIL |
private static byte[] |
VALUE |
private static int |
VALUE_SIZE |
Constructor and Description |
---|
TestServerSideScanMetricsFromClientSide() |
Modifier and Type | Method and Description |
---|---|
(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 |
getCellHeapSize() |
static void |
setUpBeforeClass() |
static void |
tearDownAfterClass() |
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 value
|
void |
testRowsFilteredMetric() |
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 |
testRowsSeenMetricWithAsync() |
void |
testRowsSeenMetricWithSync() |
private static final org.slf4j.Logger LOG
public static final HBaseClassTestRule CLASS_RULE
private static final HBaseTestingUtility TEST_UTIL
private static org.apache.hadoop.hbase.client.Table TABLE
private static org.apache.hadoop.hbase.TableName TABLE_NAME
private static int NUM_ROWS
private static byte[] ROW
private static byte[][] ROWS
private static int NUM_FAMILIES
private static byte[] FAMILY
private static byte[][] FAMILIES
private static int NUM_QUALIFIERS
private static byte[] QUALIFIER
private static byte[][] QUALIFIERS
private static int VALUE_SIZE
private static byte[] VALUE
private static int NUM_COLS
private static long CELL_HEAP_SIZE
public TestServerSideScanMetricsFromClientSide()
public static void setUpBeforeClass() throws Exception
Exception
static org.apache.hadoop.hbase.client.Table createTestTable(org.apache.hadoop.hbase.TableName name, byte[][] rows, byte[][] families, byte[][] qualifiers, byte[] cellValue) throws IOException
IOException
public static void tearDownAfterClass() throws Exception
Exception
static ArrayList<org.apache.hadoop.hbase.client.Put> createPuts(byte[][] rows, byte[][] families, byte[][] qualifiers, byte[] value) throws IOException
rows
- the rows to usefamilies
- the column families to usequalifiers
- the column qualifiers to usevalue
- the value to putIOException
- If an IO problem is encounteredprivate long getCellHeapSize() throws Exception
Exception
- on unexpected failurepublic void testRowsSeenMetricWithSync() throws Exception
Exception
public void testRowsSeenMetricWithAsync() throws Exception
Exception
private void testRowsSeenMetric(boolean async) throws Exception
Exception
public void testRowsSeenMetric(org.apache.hadoop.hbase.client.Scan baseScan) throws Exception
Exception
public void testRowsFilteredMetric() throws Exception
Exception
public void testRowsFilteredMetric(org.apache.hadoop.hbase.client.Scan baseScan) throws Exception
Exception
public void testRowsFilteredMetric(org.apache.hadoop.hbase.client.Scan baseScan, org.apache.hadoop.hbase.filter.Filter filter, int expectedNumFiltered) throws Exception
Exception
public void testMetric(org.apache.hadoop.hbase.client.Scan scan, String metricKey, long expectedValue) throws Exception
scan
- The scan instance to use to record metricsmetricKey
- The metric key nameexpectedValue
- The expected value of metricException
- on unexpected failureCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.