Package org.apache.hadoop.hbase.io
Class TestHalfStoreFileReader
java.lang.Object
org.apache.hadoop.hbase.io.TestHalfStoreFileReader
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
(package private) static final int
private static HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription(package private) static byte[]
private void
doTestOfScanAndReseek
(org.apache.hadoop.fs.Path p, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.hbase.io.Reference bottom, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConf) private org.apache.hadoop.hbase.Cell
doTestOfSeekBefore
(org.apache.hadoop.fs.Path p, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.hbase.io.Reference bottom, org.apache.hadoop.hbase.Cell seekBefore, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConfig) (package private) List<org.apache.hadoop.hbase.KeyValue>
private org.apache.hadoop.hbase.KeyValue
getLastOnCol
(org.apache.hadoop.hbase.Cell curr) static void
static void
void
Test the scanner and reseek of a half hfile scanner.void
-
Field Details
-
CLASS_RULE
-
TEST_UTIL
-
SIZE
- See Also:
-
-
Constructor Details
-
TestHalfStoreFileReader
public TestHalfStoreFileReader()
-
-
Method Details
-
setupBeforeClass
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
testHalfScanAndReseek
Test the scanner and reseek of a half hfile scanner. The scanner API demands that seekTo and reseekTo() only return < 0 if the key lies before the start of the file (with no position on the scanner). Returning 0 if perfect match (rare), and return > 1 if we got an imperfect match. The latter case being the most common, we should generally be returning 1, and if we do, there may or may not be a 'next' in the scanner/file. A bug in the half file scanner was returning -1 at the end of the bottom half, and that was causing the infrastructure above to go null causing NPEs and other problems. This test reproduces that failure, and also tests both the bottom and top of the file while we are at it.- Throws:
IOException
-
doTestOfScanAndReseek
private void doTestOfScanAndReseek(org.apache.hadoop.fs.Path p, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.hbase.io.Reference bottom, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConf) throws IOException - Throws:
IOException
-
testHalfScanner
- Throws:
IOException
-
doTestOfSeekBefore
private org.apache.hadoop.hbase.Cell doTestOfSeekBefore(org.apache.hadoop.fs.Path p, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.hbase.io.Reference bottom, org.apache.hadoop.hbase.Cell seekBefore, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConfig) throws IOException - Throws:
IOException
-
getLastOnCol
-
_b
-
genSomeKeys
List<org.apache.hadoop.hbase.KeyValue> genSomeKeys()
-