@Test public void timestampFiltersAreAdapted() { TimestampsFilter filter = new TimestampsFilter(ImmutableList.of(1L, 10L, 20L)); Filters.Filter expected = filterAdapter.adapt(emptyScanContext, filter); Interleave expectedInterleaveFilter = expected.toProto().getInterleave(); Assert.assertEquals(3, expectedInterleaveFilter.getFiltersCount()); Assert.assertEquals( 10000L, expectedInterleaveFilter.getFilters(1).getTimestampRangeFilter().getStartTimestampMicros()); Assert.assertEquals( 11000L, expectedInterleaveFilter.getFilters(1).getTimestampRangeFilter().getEndTimestampMicros()); }
@Override public Filter adapt(FilterAdapterContext context, TimestampsFilter filter) { InterleaveFilter interleave = FILTERS.interleave(); for (long timestamp : filter.getTimestamps()) { interleave.filter(TimestampFilterUtil.hbaseToTimestampRangeFilter(timestamp, timestamp + 1)); } return interleave; }
TimestampsFilterAdapter extends TypedFilterAdapterBase<TimestampsFilter> { @Override public Filter adapt(FilterAdapterContext context, TimestampsFilter filter) { InterleaveFilter interleave = FILTERS.interleave(); for (long timestamp : filter.getTimestamps()) { interleave.filter(TimestampFilterUtil.hbaseToTimestampRangeFilter(timestamp, timestamp + 1)); } return interleave; } }
TimestampsFilterAdapter extends TypedFilterAdapterBase<TimestampsFilter> { @Override public Filter adapt(FilterAdapterContext context, TimestampsFilter filter) { InterleaveFilter interleave = FILTERS.interleave(); for (long timestamp : filter.getTimestamps()) { interleave.filter(TimestampFilterUtil.hbaseToTimestampRangeFilter(timestamp, timestamp + 1)); } return interleave; }  }
TimestampsFilterAdapter extends TypedFilterAdapterBase<TimestampsFilter> { @Override public Filter adapt(FilterAdapterContext context, TimestampsFilter filter) { InterleaveFilter interleave = FILTERS.interleave(); for (long timestamp : filter.getTimestamps()) { interleave.filter(TimestampFilterUtil.hbaseToTimestampRangeFilter(timestamp, timestamp + 1)); } return interleave; }  @Override Filter adapt(FilterAdapterContext context, TimestampsFilter filter); @Override FilterSupportStatus isFilterSupported(
      FilterAdapterContext context, TimestampsFilter filter); }
TimestampsFilterAdapter extends TypedFilterAdapterBase<TimestampsFilter> { @Override public Filter adapt(FilterAdapterContext context, TimestampsFilter filter) { InterleaveFilter interleave = FILTERS.interleave(); for (long timestamp : filter.getTimestamps()) { interleave.filter(TimestampFilterUtil.hbaseToTimestampRangeFilter(timestamp, timestamp + 1)); } return interleave; }  @Override Filter adapt(FilterAdapterContext context, TimestampsFilter filter); @Override FilterSupportStatus isFilterSupported(
      FilterAdapterContext context, TimestampsFilter filter);  }