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
Modifier and TypeFieldDescriptionprivate org.apache.hadoop.hbase.regionserver.BloomType
static final HBaseClassTestRule
private static final int[][]
private org.apache.hadoop.hbase.io.compress.Compression.Algorithm
private org.apache.hadoop.hbase.client.Delete
private static final int
private List<org.apache.hadoop.hbase.Cell>
private static final String
private static final byte[]
private static final org.slf4j.Logger
private static final int[]
private static final int
private static final int
private org.apache.hadoop.hbase.client.Put
private static final int
private org.apache.hadoop.hbase.regionserver.HRegion
private static final Random
private static final int[][]
private static final HBaseTestingUtil
private long
private long
private static final boolean
Disable this when this test fails hopelessly and you need to debug a simpler case.private static final boolean
-
Constructor Summary
ConstructorDescriptionTestSeekOptimizations
(org.apache.hadoop.hbase.io.compress.Compression.Algorithm comprAlgo, org.apache.hadoop.hbase.regionserver.BloomType bloomType) -
Method Summary
Modifier and TypeMethodDescriptionvoid
assertKVListsEqual
(String additionalMsg, List<? extends org.apache.hadoop.hbase.Cell> expected, List<? extends org.apache.hadoop.hbase.Cell> actual) void
createTimestampRange
(long minTS, long maxTS, long deleteUpToTS) private byte[]
createValue
(long ts) void
delAtTimestamp
(String qual, long ts) private void
delUpToTimestamp
(String qual, long upToTS) private List<org.apache.hadoop.hbase.Cell>
filterExpectedResults
(Set<String> qualSet, byte[] startRow, byte[] endRow, int maxVersions) private final String
getQualStr
(int i) private void
static final Collection<Object[]>
private void
prepareExpectedKVs
(long latestDelTS) void
private long
randBetween
(long a, long b) private long
randLong
(long n) private final byte[]
rowBytes
(int i) private final String
rowStr
(int i) void
setUp()
void
tearDown()
void
private void
testScan
(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)
-