com.google.cloud.bigtable.hbase.adapters.filters
Class PrefixFilterAdapter
- java.lang.Object
-
- com.google.cloud.bigtable.hbase.adapters.filters.TypedFilterAdapterBase<PrefixFilter>
-
- com.google.cloud.bigtable.hbase.adapters.filters.PrefixFilterAdapter
-
- All Implemented Interfaces:
- TypedFilterAdapter<PrefixFilter>
public class PrefixFilterAdapter extends TypedFilterAdapterBase<PrefixFilter>
Adapter for HBasePrefixFilter
instances.- Version:
- $Id: $Id
- Author:
- sduskis
-
-
Constructor Summary
Constructors Constructor and Description PrefixFilterAdapter()
-
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, PrefixFilter filter)
Adapt the given filter.RangeSet<RowKeyWrapper>
getIndexScanHint(PrefixFilter filter)
Get hints how to optimize the scan.FilterSupportStatus
isFilterSupported(FilterAdapterContext context, PrefixFilter 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, PrefixFilter filter) throws IOException
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, PrefixFilter filter)
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(PrefixFilter 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<PrefixFilter>
- Overrides:
getIndexScanHint
in classTypedFilterAdapterBase<PrefixFilter>
- Parameters:
filter
- aS
object.- Returns:
- a
RangeSet
object.
-
-