use of org.apache.hadoop.hbase.filter.TimestampsFilter in project hbase by apache.
the class TestTimestampFilterSeekHint method testGetSeek.
@Test
public void testGetSeek() throws IOException {
StoreFileScanner.instrument();
prepareRegion();
Get g = new Get(RK_BYTES);
final TimestampsFilter timestampsFilter = new TimestampsFilter(ImmutableList.of(5L), true);
g.setFilter(timestampsFilter);
final long initialSeekCount = StoreFileScanner.getSeekCount();
region.get(g);
final long finalSeekCount = StoreFileScanner.getSeekCount();
/*
Make sure there's more than one.
Aka one seek to get to the row, and one to get to the time.
*/
assertTrue(finalSeekCount >= initialSeekCount + 3);
}
Aggregations