@InternalApi(value="For internal usage only") public class FilterAdapter extends Object
For internal use only - public for technical reasons.
Modifier | Constructor and Description |
---|---|
protected |
FilterAdapter()
Building the adapter map properly requires using a reference to the main FilterAdapter (to pass
to FilterListAdapter).
|
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<com.google.cloud.bigtable.data.v2.models.Filters.Filter> |
adaptFilter(FilterAdapterContext context,
org.apache.hadoop.hbase.filter.Filter filter)
Adapt an HBase filter into a Cloud Bigtable Rowfilter.
|
static FilterAdapter |
buildAdapter()
Create a new FilterAdapter
|
void |
collectUnsupportedStatuses(FilterAdapterContext context,
org.apache.hadoop.hbase.filter.Filter filter,
List<FilterSupportStatus> statuses)
Recursively collect all unsupported filters contained in Filter (which may be a FilterList)
|
protected SingleFilterAdapter<?> |
getAdapterForFilterOrThrow(org.apache.hadoop.hbase.filter.Filter filter)
Get the adapter for the given Filter or throw an UnsupportedFilterException if one is not
available.
|
com.google.common.collect.RangeSet<RowKeyWrapper> |
getIndexScanHint(org.apache.hadoop.hbase.filter.Filter filter) |
void |
throwIfUnsupportedFilter(org.apache.hadoop.hbase.client.Scan scan,
org.apache.hadoop.hbase.filter.Filter filter)
Throw a new UnsupportedFilterException if the given filter cannot be adapted to bigtable reader
expressions.
|
protected FilterAdapter()
public static FilterAdapter buildAdapter()
FilterAdapter
object.public com.google.common.base.Optional<com.google.cloud.bigtable.data.v2.models.Filters.Filter> adaptFilter(FilterAdapterContext context, org.apache.hadoop.hbase.filter.Filter filter) throws IOException
context
- a FilterAdapterContext
object.filter
- a Filter
object.Optional
object.IOException
- if any.public void throwIfUnsupportedFilter(org.apache.hadoop.hbase.client.Scan scan, org.apache.hadoop.hbase.filter.Filter filter)
scan
- a Scan
object.filter
- a Filter
object.public void collectUnsupportedStatuses(FilterAdapterContext context, org.apache.hadoop.hbase.filter.Filter filter, List<FilterSupportStatus> statuses)
filter
- The filter to inspectstatuses
- A mutable list of status into which we will add any that indicate an
unsupported Filter was found.context
- a FilterAdapterContext
object.public com.google.common.collect.RangeSet<RowKeyWrapper> getIndexScanHint(org.apache.hadoop.hbase.filter.Filter filter)
protected SingleFilterAdapter<?> getAdapterForFilterOrThrow(org.apache.hadoop.hbase.filter.Filter filter)
filter
- a Filter
object.SingleFilterAdapter
object.