public class TestScannerHeartbeatMessages extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
TestScannerHeartbeatMessages.HeartbeatHRegion
Custom HRegion class that instantiates
RegionScanner s with configurable sleep times
between fetches of row Results and/or column family cells. |
private static class |
TestScannerHeartbeatMessages.HeartbeatHRegionServer
Custom HRegionServer instance that instantiates
TestScannerHeartbeatMessages.HeartbeatRPCServices in place of
RSRpcServices to allow us to toggle support for heartbeat messages |
private static class |
TestScannerHeartbeatMessages.HeartbeatKVHeap
Custom KV Heap that can be configured to sleep/wait in between retrievals of column family
cells.
|
private static class |
TestScannerHeartbeatMessages.HeartbeatRegionScanner
Custom RegionScanner that can be configured to sleep between retrievals of row Results and/or
column family cells
|
private static class |
TestScannerHeartbeatMessages.HeartbeatReversedKVHeap
Custom reversed KV Heap that can be configured to sleep in between retrievals of column family
cells.
|
private static class |
TestScannerHeartbeatMessages.HeartbeatReversedRegionScanner
Custom ReversedRegionScanner that can be configured to sleep between retrievals of row Results
and/or column family cells
|
private static class |
TestScannerHeartbeatMessages.HeartbeatRPCServices
Custom RSRpcServices instance that allows heartbeat support to be toggled
|
static class |
TestScannerHeartbeatMessages.SparseCellFilter |
static class |
TestScannerHeartbeatMessages.SparseRowFilter |
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static int |
CLIENT_TIMEOUT |
private static int |
DEFAULT_CF_SLEEP_TIME |
private static int |
DEFAULT_ROW_SLEEP_TIME |
private static byte[][] |
FAMILIES |
private static byte[] |
FAMILY |
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 int |
SERVER_TIMEOUT |
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 |
---|
TestScannerHeartbeatMessages() |
Modifier and Type | Method and Description |
---|---|
private static void |
configureSleepTime(int rowSleepTime,
int cfSleepTime,
boolean sleepBeforeCf)
Helper method for setting the time to sleep between rows and column families.
|
(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 static void |
disableSleeping()
Disable the sleeping mechanism server side.
|
static void |
setUpBeforeClass() |
void |
setupBeforeTest() |
static void |
tearDownAfterClass() |
void |
teardownAfterTest() |
private void |
testEquivalenceOfScanWithHeartbeats(org.apache.hadoop.hbase.client.Scan scan,
int rowSleepTime,
int cfSleepTime,
boolean sleepBeforeCf)
Test the equivalence of a scan versus the same scan executed when heartbeat messages are
necessary
|
void |
testHeartbeatBetweenColumnFamilies()
Test the case that the time limit for scans is reached in between column families
|
void |
testHeartbeatBetweenRows()
Test the case that the time limit for the scan is reached after each full row of cells is
fetched.
|
void |
testHeartbeatWithSparseCellFilter()
Test the case that there is a filter which filters most of cells
|
void |
testHeartbeatWithSparseRowFilter()
Test the case that there is a filter which filters most of rows
|
private void |
testImportanceOfHeartbeats(Callable<Void> testCallable)
Run the test callable when heartbeats are enabled/disabled.
|
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 SERVER_TIMEOUT
private static int CLIENT_TIMEOUT
private static int DEFAULT_ROW_SLEEP_TIME
private static int DEFAULT_CF_SLEEP_TIME
public TestScannerHeartbeatMessages()
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
static ArrayList<org.apache.hadoop.hbase.client.Put> createPuts(byte[][] rows, byte[][] families, byte[][] qualifiers, byte[] value) throws IOException
IOException
public static void tearDownAfterClass() throws Exception
Exception
public void setupBeforeTest() throws Exception
Exception
public void teardownAfterTest() throws Exception
Exception
private void testImportanceOfHeartbeats(Callable<Void> testCallable) throws InterruptedException
InterruptedException
public void testHeartbeatBetweenRows() throws Exception
Exception
public void testHeartbeatBetweenColumnFamilies() throws Exception
Exception
public void testHeartbeatWithSparseCellFilter() throws Exception
Exception
public void testHeartbeatWithSparseRowFilter() throws Exception
Exception
private void testEquivalenceOfScanWithHeartbeats(org.apache.hadoop.hbase.client.Scan scan, int rowSleepTime, int cfSleepTime, boolean sleepBeforeCf) throws Exception
scan
- The scan configuration being testedrowSleepTime
- The time to sleep between fetches of row cellscfSleepTime
- The time to sleep between fetches of column family cellssleepBeforeCf
- set to true when column family sleeps should occur before the cells for
that column family are fetchedException
private static void configureSleepTime(int rowSleepTime, int cfSleepTime, boolean sleepBeforeCf)
private static void disableSleeping()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.