Package org.apache.hadoop.hbase.io.hfile
Class TestSeekBeforeWithInlineBlocks
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestSeekBeforeWithInlineBlocks
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
static final HBaseClassTestRule
private org.apache.hadoop.conf.Configuration
private static final int
private static final int[]
private static final byte[]
private org.apache.hadoop.fs.FileSystem
private static final int[]
private static final org.slf4j.Logger
private static final int
private static final Random
private static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
checkCell
(org.apache.hadoop.hbase.Cell expected, org.apache.hadoop.hbase.Cell actual) Check a key/value pair after it was read by the readerprivate void
checkNoSeekBefore
(org.apache.hadoop.hbase.Cell[] cells, org.apache.hadoop.hbase.io.hfile.HFileScanner scanner, int i) private void
checkSeekBefore
(org.apache.hadoop.hbase.Cell[] cells, org.apache.hadoop.hbase.io.hfile.HFileScanner scanner, int i) void
Scanner.seekBefore() could fail because when seeking to a previous HFile data block, it needs to know the size of that data block, which it calculates using current data block offset and the previous data block offset.
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
NUM_KV
- See Also:
-
DATA_BLOCK_SIZE
- See Also:
-
BLOOM_BLOCK_SIZE
- See Also:
-
INDEX_CHUNK_SIZES
-
EXPECTED_NUM_LEVELS
-
RAND
-
FAM
-
fs
-
conf
-
-
Constructor Details
-
TestSeekBeforeWithInlineBlocks
public TestSeekBeforeWithInlineBlocks()
-
-
Method Details
-
testMultiIndexLevelRandomHFileWithBlooms
Scanner.seekBefore() could fail because when seeking to a previous HFile data block, it needs to know the size of that data block, which it calculates using current data block offset and the previous data block offset. This fails to work when there are leaf-level index blocks in the scannable section of the HFile, i.e. starting in HFileV2. This test will try seekBefore() on a flat (single-level) and multi-level (2,3) HFile and confirm this bug is now fixed. This bug also happens for inline Bloom blocks for the same reasons.- Throws:
IOException
-
checkSeekBefore
private void checkSeekBefore(org.apache.hadoop.hbase.Cell[] cells, org.apache.hadoop.hbase.io.hfile.HFileScanner scanner, int i) throws IOException - Throws:
IOException
-
checkNoSeekBefore
private void checkNoSeekBefore(org.apache.hadoop.hbase.Cell[] cells, org.apache.hadoop.hbase.io.hfile.HFileScanner scanner, int i) throws IOException - Throws:
IOException
-
checkCell
Check a key/value pair after it was read by the reader
-