Search in sources :

Example 1 with ApplyAndFilterDeletesFilter

use of org.apache.phoenix.hbase.index.covered.filter.ApplyAndFilterDeletesFilter in project phoenix by apache.

the class ScannerBuilder method buildIndexedColumnScanner.

public Scanner buildIndexedColumnScanner(Collection<? extends ColumnReference> indexedColumns, ColumnTracker tracker, long ts, boolean returnNullIfRowNotFound) {
    Filter columnFilters = getColumnFilters(indexedColumns);
    FilterList filters = new FilterList(Lists.newArrayList(columnFilters));
    // skip to the right TS. This needs to come before the deletes since the deletes will hide any
    // state that comes before the actual kvs, so we need to capture those TS as they change the row
    // state.
    filters.addFilter(new ColumnTrackingNextLargestTimestampFilter(ts, tracker));
    // filter out kvs based on deletes
    filters.addFilter(new ApplyAndFilterDeletesFilter(getAllFamilies(indexedColumns)));
    // combine the family filters and the rest of the filters as a
    return getFilteredScanner(filters, returnNullIfRowNotFound);
}
Also used : ColumnTrackingNextLargestTimestampFilter(org.apache.phoenix.hbase.index.covered.filter.ColumnTrackingNextLargestTimestampFilter) FamilyFilter(org.apache.hadoop.hbase.filter.FamilyFilter) QualifierFilter(org.apache.hadoop.hbase.filter.QualifierFilter) Filter(org.apache.hadoop.hbase.filter.Filter) ApplyAndFilterDeletesFilter(org.apache.phoenix.hbase.index.covered.filter.ApplyAndFilterDeletesFilter) ApplyAndFilterDeletesFilter(org.apache.phoenix.hbase.index.covered.filter.ApplyAndFilterDeletesFilter) FilterList(org.apache.hadoop.hbase.filter.FilterList) ColumnTrackingNextLargestTimestampFilter(org.apache.phoenix.hbase.index.covered.filter.ColumnTrackingNextLargestTimestampFilter)

Aggregations

FamilyFilter (org.apache.hadoop.hbase.filter.FamilyFilter)1 Filter (org.apache.hadoop.hbase.filter.Filter)1 FilterList (org.apache.hadoop.hbase.filter.FilterList)1 QualifierFilter (org.apache.hadoop.hbase.filter.QualifierFilter)1 ApplyAndFilterDeletesFilter (org.apache.phoenix.hbase.index.covered.filter.ApplyAndFilterDeletesFilter)1 ColumnTrackingNextLargestTimestampFilter (org.apache.phoenix.hbase.index.covered.filter.ColumnTrackingNextLargestTimestampFilter)1