Package org.apache.hadoop.hbase.client
Class TestScannersFromClientSide
java.lang.Object
org.apache.hadoop.hbase.client.TestScannersFromClientSide
A client-side test, mostly testing scanners with various parameters. Parameterized on different
registry implementations.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static byte[]
private static final org.slf4j.Logger
private static byte[]
private static byte[]
private static HBaseTestingUtility
private static byte[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
isSameParameterizedCluster
(Class<?> registryImpl, int numHedgedReqs) JUnit does not provide an easy way to run a hook after each parameterized run.private static byte[][]
makeNAsciiWithZeroPrefix
(byte[] base, int n) static Collection<Object[]>
void
setUp()
static void
private void
testAsyncScanner
(org.apache.hadoop.hbase.TableName table, int rowNumber, int familyNumber, int qualifierNumber, int caching, Consumer<Boolean> listener) void
void
void
void
Test from client side for get with maxResultPerCF setvoid
Test from client side for get with rowOffsetvoid
void
void
void
Test from client side for batch of scanvoid
void
Test from client side for scan with maxResultPerCF setvoid
Scan on not existing table should throw the exception with correct messagevoid
void
Test from client side for scan while the region is reopened on the same region server.void
void
void
void
private void
testSmallScan
(org.apache.hadoop.hbase.client.Table table, boolean reversed, int rows, int columns) Run through a variety of test configurations with a small scanprivate void
verifyExpectedCounts
(org.apache.hadoop.hbase.client.Table table, org.apache.hadoop.hbase.client.Scan scan, int expectedRowCount, int expectedCellCount) (package private) static void
verifyResult
(org.apache.hadoop.hbase.client.Result result, List<org.apache.hadoop.hbase.Cell> expKvList, boolean toLog, String msg)
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
ROW
-
FAMILY
-
QUALIFIER
-
VALUE
-
name
-
-
Constructor Details
-
TestScannersFromClientSide
- Throws:
Exception
-
-
Method Details
-
tearDownAfterClass
- Throws:
Exception
-
setUp
- Throws:
Exception
-
parameters
-
isSameParameterizedCluster
JUnit does not provide an easy way to run a hook after each parameterized run. Without that there is no easy way to restart the test cluster after each parameterized run. Annotation BeforeParam does not work either because it runs before parameterization and hence does not have access to the test parameters (which is weird). This *hack* checks if the current instance of test cluster configuration has the passed parameterized configs. In such a case, we can just reuse the cluster for test and do not need to initialize from scratch. While this is a hack, it saves a ton of time for the full test and de-flakes it. -
testScanImmutable
- Throws:
IOException
-
testScanBatch
Test from client side for batch of scan- Throws:
Exception
-
testMaxResultSizeIsSetToDefault
- Throws:
Exception
-
testScannerForNotExistingTable
Scan on not existing table should throw the exception with correct message -
testSmallScan
- Throws:
Exception
-
testSmallScan
private void testSmallScan(org.apache.hadoop.hbase.client.Table table, boolean reversed, int rows, int columns) throws Exception Run through a variety of test configurations with a small scan- Throws:
Exception
-
verifyExpectedCounts
private void verifyExpectedCounts(org.apache.hadoop.hbase.client.Table table, org.apache.hadoop.hbase.client.Scan scan, int expectedRowCount, int expectedCellCount) throws Exception - Throws:
Exception
-
testGetMaxResults
Test from client side for get with maxResultPerCF set- Throws:
Exception
-
testScanMaxResults
Test from client side for scan with maxResultPerCF set- Throws:
Exception
-
testGetRowOffset
Test from client side for get with rowOffset- Throws:
Exception
-
testScanRawDeleteFamilyVersion
- Throws:
Exception
-
testScanOnReopenedRegion
Test from client side for scan while the region is reopened on the same region server.- Throws:
Exception
-
testAsyncScannerWithSmallData
- Throws:
Exception
-
testAsyncScannerWithManyRows
- Throws:
Exception
-
testAsyncScannerWithoutCaching
- Throws:
Exception
-
testAsyncScanner
private void testAsyncScanner(org.apache.hadoop.hbase.TableName table, int rowNumber, int familyNumber, int qualifierNumber, int caching, Consumer<Boolean> listener) throws Exception - Throws:
Exception
-
makeNAsciiWithZeroPrefix
-
verifyResult
static void verifyResult(org.apache.hadoop.hbase.client.Result result, List<org.apache.hadoop.hbase.Cell> expKvList, boolean toLog, String msg) -
testReadExpiredDataForRawScan
- Throws:
IOException
-
testScanWithColumnsAndFilterAndVersion
- Throws:
IOException
-
testScanWithSameStartRowStopRow
- Throws:
IOException
-
testReverseScanWithFlush
- Throws:
Exception
-
testScannerWithPartialResults
- Throws:
Exception
-