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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static byte[]private static final org.slf4j.Loggerprivate static byte[]private static byte[]private static HBaseTestingUtilityprivate static byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanisSameParameterizedCluster(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[]>voidsetUp()static voidprivate voidtestAsyncScanner(org.apache.hadoop.hbase.TableName table, int rowNumber, int familyNumber, int qualifierNumber, int caching, Consumer<Boolean> listener) voidvoidvoidvoidTest from client side for get with maxResultPerCF setvoidTest from client side for get with rowOffsetvoidvoidvoidvoidTest from client side for batch of scanvoidvoidTest from client side for scan with maxResultPerCF setvoidScan on not existing table should throw the exception with correct messagevoidvoidTest from client side for scan while the region is reopened on the same region server.voidvoidvoidvoidprivate voidtestSmallScan(org.apache.hadoop.hbase.client.Table table, boolean reversed, int rows, int columns) Run through a variety of test configurations with a small scanprivate voidverifyExpectedCounts(org.apache.hadoop.hbase.client.Table table, org.apache.hadoop.hbase.client.Scan scan, int expectedRowCount, int expectedCellCount) (package private) static voidverifyResult(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
-