testHalfScanAndReseek
public void testHalfScanAndReseek()
throws IOException
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