@Test public void testNotSupported_OtherComparator() { ByteArrayComparable comparator = new LongComparator(1L); org.apache.hadoop.hbase.filter.RowFilter filter = new org.apache.hadoop.hbase.filter.RowFilter(CompareFilter.CompareOp.EQUAL, comparator); Assert.assertFalse(adapter.isFilterSupported(context, filter).isSupported()); }
@Override public FilterSupportStatus isFilterSupported(FilterAdapterContext context, FamilyFilter filter) { ByteArrayComparable comparator = filter.getComparator(); if (!(comparator instanceof RegexStringComparator) && !(comparator instanceof BinaryComparator)) { return FilterSupportStatus.newNotSupported( comparator.getClass().getName() + " comparator is not supported"); } if (filter.getOperator() != CompareFilter.CompareOp.EQUAL) { return FilterSupportStatus.newNotSupported( filter.getOperator() + " operator is not supported"); } return FilterSupportStatus.SUPPORTED; }
FamilyFilterAdapter extends TypedFilterAdapterBase<FamilyFilter> { @Override public FilterSupportStatus isFilterSupported(FilterAdapterContext context, FamilyFilter filter) { ByteArrayComparable comparator = filter.getComparator(); if (!(comparator instanceof RegexStringComparator) && !(comparator instanceof BinaryComparator)) { return FilterSupportStatus.newNotSupported( comparator.getClass().getName() + " comparator is not supported"); } if (filter.getOperator() != CompareFilter.CompareOp.EQUAL) { return FilterSupportStatus.newNotSupported( filter.getOperator() + " operator is not supported"); } return FilterSupportStatus.SUPPORTED; } }
FamilyFilterAdapter extends TypedFilterAdapterBase<FamilyFilter> { @Override public FilterSupportStatus isFilterSupported(FilterAdapterContext context, FamilyFilter filter) { ByteArrayComparable comparator = filter.getComparator(); if (!(comparator instanceof RegexStringComparator) && !(comparator instanceof BinaryComparator)) { return FilterSupportStatus.newNotSupported( comparator.getClass().getName() + " comparator is not supported"); } if (filter.getOperator() != CompareFilter.CompareOp.EQUAL) { return FilterSupportStatus.newNotSupported( filter.getOperator() + " operator is not supported"); } return FilterSupportStatus.SUPPORTED; }  }
FamilyFilterAdapter extends TypedFilterAdapterBase<FamilyFilter> { @Override public FilterSupportStatus isFilterSupported(FilterAdapterContext context, FamilyFilter filter) { ByteArrayComparable comparator = filter.getComparator(); if (!(comparator instanceof RegexStringComparator) && !(comparator instanceof BinaryComparator)) { return FilterSupportStatus.newNotSupported( comparator.getClass().getName() + " comparator is not supported"); } if (filter.getOperator() != CompareFilter.CompareOp.EQUAL) { return FilterSupportStatus.newNotSupported( filter.getOperator() + " operator is not supported"); } return FilterSupportStatus.SUPPORTED; }  @Override Filter adapt(FilterAdapterContext context, FamilyFilter filter); @Override FilterSupportStatus isFilterSupported(FilterAdapterContext context, FamilyFilter filter); }
FamilyFilterAdapter extends TypedFilterAdapterBase<FamilyFilter> { @Override public FilterSupportStatus isFilterSupported(FilterAdapterContext context, FamilyFilter filter) { ByteArrayComparable comparator = filter.getComparator(); if (!(comparator instanceof RegexStringComparator) && !(comparator instanceof BinaryComparator)) { return FilterSupportStatus.newNotSupported( comparator.getClass().getName() + " comparator is not supported"); } if (filter.getOperator() != CompareFilter.CompareOp.EQUAL) { return FilterSupportStatus.newNotSupported( filter.getOperator() + " operator is not supported"); } return FilterSupportStatus.SUPPORTED; }  @Override Filter adapt(FilterAdapterContext context, FamilyFilter filter); @Override FilterSupportStatus isFilterSupported(FilterAdapterContext context, FamilyFilter filter);  }