Class TestMultiColumnScanner
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestMultiColumnScanner
- Direct Known Subclasses:
TestMultiColumnScannerWithAlgoGZAndNoDataEncoding
,TestMultiColumnScannerWithAlgoGZAndUseDataEncoding
,TestMultiColumnScannerWithNoneAndNoDataEncoding
,TestMultiColumnScannerWithNoneAndUseDataEncoding
Tests optimized scanning of multiple columns.
We separated the big test into several sub-class UT, because When in ROWCOL bloom type, we will test the row-col bloom filter frequently for saving HDFS seek once we switch from one column to another in our UT. It's cpu time consuming (~45s for each case), so moved the ROWCOL case into a separated LargeTests to avoid timeout failure.
To be clear: In TestMultiColumnScanner, we will flush 10 (NUM_FLUSHES=10) HFiles here, and the table will put ~1000 cells (rows=20, ts=6, qualifiers=8, total=20*6*8 ~ 1000) . Each full table scan will check the ROWCOL bloom filter 20 (rows)* 8 (column) * 10 (hfiles)= 1600 times, beside it will scan the full table 6*2^8=1536 times, so finally will have 1600*1536=2457600 bloom filter testing. (See HBASE-21520)
We separated the big test into several sub-class UT, because When in ROWCOL bloom type, we will test the row-col bloom filter frequently for saving HDFS seek once we switch from one column to another in our UT. It's cpu time consuming (~45s for each case), so moved the ROWCOL case into a separated LargeTests to avoid timeout failure.
To be clear: In TestMultiColumnScanner, we will flush 10 (NUM_FLUSHES=10) HFiles here, and the table will put ~1000 cells (rows=20, ts=6, qualifiers=8, total=20*6*8 ~ 1000) . Each full table scan will check the ROWCOL bloom filter 20 (rows)* 8 (column) * 10 (hfiles)= 1600 times, beside it will scan the full table 6*2^8=1536 times, so finally will have 1600*1536=2457600 bloom filter testing. (See HBASE-21520)
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final long
A large value of type long for use as a timestamporg.apache.hadoop.hbase.regionserver.BloomType
private static final double
The probability that a column is skipped in a store file.org.apache.hadoop.hbase.io.compress.Compression.Algorithm
org.apache.hadoop.hbase.io.encoding.DataBlockEncoding
private static final double
The probability to delete a row/column pairprivate static final String
private static final byte[]
private static final org.slf4j.Logger
private static final int
(package private) static final int
private static final int
The size of the column qualifier set used.private static final int
private static final int
private static final String
private static final HBaseTestingUtil
private static final long[]
Timestamps to test with. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) static String
createValue
(String row, String qual, long ts) static Collection<Object[]>
generateParams
(org.apache.hadoop.hbase.io.compress.Compression.Algorithm algo, boolean useDataBlockEncoding) private static String
getRowQualStr
(org.apache.hadoop.hbase.Cell kv) private static boolean
matchesQuery
(org.apache.hadoop.hbase.KeyValue kv, Set<String> qualSet, int maxVersions, Map<String, Long> lastDelTimeMap) private static String
qualStr
(org.apache.hadoop.hbase.KeyValue kv) sequentialStrings
(String prefix, int n) void
-
Field Details
-
LOG
-
TABLE_NAME
-
MAX_VERSIONS
- See Also:
-
FAMILY
- See Also:
-
FAMILY_BYTES
-
NUM_COLUMNS
The size of the column qualifier set used. Increasing this parameter exponentially increases test time.- See Also:
-
MAX_COLUMN_BIT_MASK
- See Also:
-
NUM_FLUSHES
- See Also:
-
NUM_ROWS
- See Also:
-
BIG_LONG
A large value of type long for use as a timestamp- See Also:
-
TIMESTAMPS
Timestamps to test with. Cannot useLong.MAX_VALUE
here, because it will be replaced by an timestamp auto-generated based on the time. -
COLUMN_SKIP_IN_STORE_FILE_PROB
The probability that a column is skipped in a store file.- See Also:
-
DELETE_PROBABILITY
The probability to delete a row/column pair- See Also:
-
TEST_UTIL
-
comprAlgo
-
bloomType
-
dataBlockEncoding
-
-
Constructor Details
-
TestMultiColumnScanner
public TestMultiColumnScanner()
-
-
Method Details
-
generateParams
public static Collection<Object[]> generateParams(org.apache.hadoop.hbase.io.compress.Compression.Algorithm algo, boolean useDataBlockEncoding) -
testMultiColumnScanner
- Throws:
IOException
-
getRowQualStr
-
matchesQuery
-
qualStr
-
createValue
-
sequentialStrings
-