@Test public void filterIfMissingIsApplied() throws IOException { String valueStr = "foobar"; byte[] filterValue = Bytes.toBytes(valueStr); byte[] qualifier = Bytes.toBytes("someColumn"); byte[] family = Bytes.toBytes("f"); SingleColumnValueFilter filter = new SingleColumnValueFilter( family, qualifier, CompareFilter.CompareOp.EQUAL, new BinaryComparator(filterValue)); filter.setFilterIfMissing(true); filter.setLatestVersionOnly(false); Filters.Filter adaptedFilter = UNDER_TEST.adapt(new FilterAdapterContext(new Scan(), null), filter); assertColumnSpecification( family, qualifier, false, adaptedFilter.toProto().getCondition().getPredicateFilter()); Assert.assertEquals( createValueRangeFilter(valueStr), getValueRangeFilter( adaptedFilter.toProto().getCondition().getPredicateFilter().getChain())); Assert.assertEquals( FILTERS.pass().toProto(), adaptedFilter.toProto().getCondition().getTrueFilter()); }
@Override public Filter adapt(FilterAdapterContext context, SingleColumnValueFilter filter) throws IOException { return toFilter(context, filter); }
SingleColumnValueFilterAdapter extends TypedFilterAdapterBase<SingleColumnValueFilter> { @Override public Filter adapt(FilterAdapterContext context, SingleColumnValueFilter filter) throws IOException { return toFilter(context, filter); } }
SingleColumnValueFilterAdapter extends TypedFilterAdapterBase<SingleColumnValueFilter> { @Override public Filter adapt(FilterAdapterContext context, SingleColumnValueFilter filter) throws IOException { return toFilter(context, filter); } SingleColumnValueFilterAdapter(ValueFilterAdapter delegateAdapter); }
SingleColumnValueFilterAdapter extends TypedFilterAdapterBase<SingleColumnValueFilter> { @Override public Filter adapt(FilterAdapterContext context, SingleColumnValueFilter filter) throws IOException { return toFilter(context, filter); } SingleColumnValueFilterAdapter(ValueFilterAdapter delegateAdapter); @Override Filter adapt(FilterAdapterContext context, SingleColumnValueFilter filter); @Override FilterSupportStatus isFilterSupported(
      FilterAdapterContext context, SingleColumnValueFilter filter); }
SingleColumnValueFilterAdapter extends TypedFilterAdapterBase<SingleColumnValueFilter> { @Override public Filter adapt(FilterAdapterContext context, SingleColumnValueFilter filter) throws IOException { return toFilter(context, filter); } SingleColumnValueFilterAdapter(ValueFilterAdapter delegateAdapter); @Override Filter adapt(FilterAdapterContext context, SingleColumnValueFilter filter); @Override FilterSupportStatus isFilterSupported(
      FilterAdapterContext context, SingleColumnValueFilter filter);  }