com.google.cloud.bigtable.hbase.adapters.filters
Class MultiRowRangeFilterAdapter
- java.lang.Object
-
- com.google.cloud.bigtable.hbase.adapters.filters.TypedFilterAdapterBase<MultiRowRangeFilter>
-
- com.google.cloud.bigtable.hbase.adapters.filters.MultiRowRangeFilterAdapter
-
- All Implemented Interfaces:
- TypedFilterAdapter<MultiRowRangeFilter>
public class MultiRowRangeFilterAdapter extends TypedFilterAdapterBase<MultiRowRangeFilter>
Adapter forMultiRowRangeFilter
, it converts the filter into an index scan hint
-
-
Constructor Summary
Constructors Constructor and Description MultiRowRangeFilterAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description com.google.cloud.bigtable.data.v2.models.Filters.Filter
adapt(FilterAdapterContext context, MultiRowRangeFilter filter)
Adapt the given filter.RangeSet<RowKeyWrapper>
getIndexScanHint(MultiRowRangeFilter filter)
Get hints how to optimize the scan.FilterSupportStatus
isFilterSupported(FilterAdapterContext context, MultiRowRangeFilter filter)
Determine if the given filter can be adapted to a Bigtable RowFilter.
-
-
-
Method Detail
-
adapt
public com.google.cloud.bigtable.data.v2.models.Filters.Filter adapt(FilterAdapterContext context, MultiRowRangeFilter filter) throws IOException
Description copied from interface:TypedFilterAdapter
Adapt the given filter. Implementers of this method should assume that isFilterSupported has already been called with a result indicating it is in fact supproted.- Parameters:
context
- aFilterAdapterContext
object.filter
- a S object.- Returns:
- a
Filters.Filter
object. - Throws:
IOException
- if any.
-
isFilterSupported
public FilterSupportStatus isFilterSupported(FilterAdapterContext context, MultiRowRangeFilter filter)
Description copied from interface:TypedFilterAdapter
Determine if the given filter can be adapted to a Bigtable RowFilter.- Parameters:
context
- aFilterAdapterContext
object.filter
- a S object.- Returns:
- a
FilterSupportStatus
object.
-
getIndexScanHint
public RangeSet<RowKeyWrapper> getIndexScanHint(MultiRowRangeFilter filter)
Description copied from interface:TypedFilterAdapter
Get hints how to optimize the scan. For example if the filter will narrow the scan using the prefix "ab" then we can restrict the scan to ["ab" - "ac"). If the filter doesn't narrow the scan then it should return Range.all()- Specified by:
getIndexScanHint
in interfaceTypedFilterAdapter<MultiRowRangeFilter>
- Overrides:
getIndexScanHint
in classTypedFilterAdapterBase<MultiRowRangeFilter>
- Parameters:
filter
- aS
object.- Returns:
- a
RangeSet
object.
-
-