Class TestSeekOptimizations
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestSeekOptimizations
Test various seek optimizations for correctness and check if they are actually saving I/O
operations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.hbase.regionserver.BloomTypestatic final HBaseClassTestRuleprivate static final int[][]private org.apache.hadoop.hbase.io.compress.Compression.Algorithmprivate org.apache.hadoop.hbase.client.Deleteprivate static final intprivate List<org.apache.hadoop.hbase.Cell>private static final Stringprivate static final byte[]private static final org.slf4j.Loggerprivate static final int[]private static final intprivate static final intprivate org.apache.hadoop.hbase.client.Putprivate static final intprivate org.apache.hadoop.hbase.regionserver.HRegionprivate static final Randomprivate static final int[][]private static final HBaseTestingUtilprivate longprivate longprivate static final booleanDisable this when this test fails hopelessly and you need to debug a simpler case.private static final boolean -
Constructor Summary
ConstructorsConstructorDescriptionTestSeekOptimizations(org.apache.hadoop.hbase.io.compress.Compression.Algorithm comprAlgo, org.apache.hadoop.hbase.regionserver.BloomType bloomType) -
Method Summary
Modifier and TypeMethodDescriptionvoidassertKVListsEqual(String additionalMsg, List<? extends org.apache.hadoop.hbase.Cell> expected, List<? extends org.apache.hadoop.hbase.Cell> actual) voidcreateTimestampRange(long minTS, long maxTS, long deleteUpToTS) private byte[]createValue(long ts) voiddelAtTimestamp(String qual, long ts) private voiddelUpToTimestamp(String qual, long upToTS) private List<org.apache.hadoop.hbase.Cell>filterExpectedResults(Set<String> qualSet, byte[] startRow, byte[] endRow, int maxVersions) private final StringgetQualStr(int i) private voidstatic final Collection<Object[]>private voidprepareExpectedKVs(long latestDelTS) voidprivate longrandBetween(long a, long b) private longrandLong(long n) private final byte[]rowBytes(int i) private final StringrowStr(int i) voidsetUp()voidtearDown()voidprivate voidtestScan(int[] columnArr, boolean lazySeekEnabled, int startRow, int endRow, int maxVersions)
-
Field Details
-
CLASS_RULE
-
LOG
-
FAMILY
- See Also:
-
FAMILY_BYTES
-
PUTS_PER_ROW_COL
- See Also:
-
DELETES_PER_ROW_COL
- See Also:
-
NUM_ROWS
- See Also:
-
NUM_COLS
- See Also:
-
VERBOSE
- See Also:
-
USE_MANY_STORE_FILES
Disable this when this test fails hopelessly and you need to debug a simpler case.- See Also:
-
COLUMN_SETS
-
ROW_RANGES
-
MAX_VERSIONS_VALUES
-
region
-
put
-
del
-
putTimestamps
-
delTimestamps
-
expectedKVs
-
comprAlgo
-
bloomType
-
totalSeekDiligent
-
totalSeekLazy
-
TEST_UTIL
-
RNG
-
-
Constructor Details
-
TestSeekOptimizations
public TestSeekOptimizations(org.apache.hadoop.hbase.io.compress.Compression.Algorithm comprAlgo, org.apache.hadoop.hbase.regionserver.BloomType bloomType)
-
-
Method Details
-
parameters
-
setUp
-
testMultipleTimestampRanges
- Throws:
IOException
-
testScan
private void testScan(int[] columnArr, boolean lazySeekEnabled, int startRow, int endRow, int maxVersions) throws IOException - Throws:
IOException
-
filterExpectedResults
private List<org.apache.hadoop.hbase.Cell> filterExpectedResults(Set<String> qualSet, byte[] startRow, byte[] endRow, int maxVersions) -
prepareExpectedKVs
-
put
-
createValue
-
delAtTimestamp
-
logDelete
-
delUpToTimestamp
-
randLong
-
randBetween
-
rowStr
-
rowBytes
-
getQualStr
-
createTimestampRange
- Throws:
IOException
-
tearDown
- Throws:
IOException
-
assertKVListsEqual
public void assertKVListsEqual(String additionalMsg, List<? extends org.apache.hadoop.hbase.Cell> expected, List<? extends org.apache.hadoop.hbase.Cell> actual)
-