@Test public void testHalfScanAndReseek() throws IOException { HBaseTestingUtility test_util = new HBaseTestingUtility(); String root_dir = HBaseTestingUtility.getTestDir("TestHalfStoreFile").toString(); Path p = new Path(root_dir, "test"); FileSystem fs = FileSystem.get(test_util.getConfiguration()); HFile.Writer w = new HFile.Writer(fs, p, 1024, "none", KeyValue.KEY_COMPARATOR); List<KeyValue> items = genSomeKeys(); for (KeyValue kv : items) { w.append(kv); } w.close(); HFile.Reader r = new HFile.Reader(fs, p, null, false); r.loadFileInfo(); byte [] midkey = r.midkey(); KeyValue midKV = KeyValue.createKeyValueFromKey(midkey); midkey = midKV.getRow(); Reference bottom = new Reference(midkey, Reference.Range.bottom); doTestOfScanAndReseek(p, fs, bottom); Reference top = new Reference(midkey, Reference.Range.top); doTestOfScanAndReseek(p, fs, top); }
@Override public byte[] midkey() throws IOException { return null; }
HalfStoreFileReader extends StoreFile.Reader { @Override public byte[] midkey() throws IOException { return null; } }
HalfStoreFileReader extends StoreFile.Reader { @Override public byte[] midkey() throws IOException { return null; } HalfStoreFileReader(final FileSystem fs, final Path p, final BlockCache c,
    final Reference r); }
HalfStoreFileReader extends StoreFile.Reader { @Override public byte[] midkey() throws IOException { return null; } HalfStoreFileReader(final FileSystem fs, final Path p, final BlockCache c,
    final Reference r); @Override HFileScanner getScanner(final boolean cacheBlocks, final boolean pread); @Override byte[] getLastKey(); @Override byte[] midkey(); }
HalfStoreFileReader extends StoreFile.Reader { @Override public byte[] midkey() throws IOException { return null; } HalfStoreFileReader(final FileSystem fs, final Path p, final BlockCache c,
    final Reference r); @Override HFileScanner getScanner(final boolean cacheBlocks, final boolean pread); @Override byte[] getLastKey(); @Override byte[] midkey();  }