use of org.apache.hadoop.hbase.filter.FilterList in project cdap by caskdata.
the class Filters method combine.
/**
* Adds {@code overrideFilter} on to {@code baseFilter}, if it exists, otherwise replaces it.
*/
public static Filter combine(Filter overrideFilter, Filter baseFilter) {
if (baseFilter != null) {
FilterList filterList = new FilterList(FilterList.Operator.MUST_PASS_ALL);
filterList.addFilter(baseFilter);
filterList.addFilter(overrideFilter);
return filterList;
}
return overrideFilter;
}
use of org.apache.hadoop.hbase.filter.FilterList in project cdap by caskdata.
the class Filters method combine.
/**
* Adds {@code overrideFilter} on to {@code baseFilter}, if it exists, otherwise replaces it.
*/
public static Filter combine(Filter overrideFilter, Filter baseFilter) {
if (baseFilter != null) {
FilterList filterList = new FilterList(FilterList.Operator.MUST_PASS_ALL);
filterList.addFilter(baseFilter);
filterList.addFilter(overrideFilter);
return filterList;
}
return overrideFilter;
}
use of org.apache.hadoop.hbase.filter.FilterList in project cdap by caskdata.
the class Filters method combine.
/**
* Adds {@code overrideFilter} on to {@code baseFilter}, if it exists, otherwise replaces it.
*/
public static Filter combine(Filter overrideFilter, Filter baseFilter) {
if (baseFilter != null) {
FilterList filterList = new FilterList(FilterList.Operator.MUST_PASS_ALL);
filterList.addFilter(baseFilter);
filterList.addFilter(overrideFilter);
return filterList;
}
return overrideFilter;
}
use of org.apache.hadoop.hbase.filter.FilterList in project cdap by caskdata.
the class DequeueScanObserver method preScannerOpen.
@Override
public RegionScanner preScannerOpen(ObserverContext<RegionCoprocessorEnvironment> e, Scan scan, RegionScanner s) throws IOException {
ConsumerConfig consumerConfig = DequeueScanAttributes.getConsumerConfig(scan);
Transaction tx = DequeueScanAttributes.getTx(scan);
if (consumerConfig == null || tx == null) {
return super.preScannerOpen(e, scan, s);
}
Filter dequeueFilter = new DequeueFilter(consumerConfig, tx);
Filter existing = scan.getFilter();
if (existing != null) {
Filter combined = new FilterList(FilterList.Operator.MUST_PASS_ALL, existing, dequeueFilter);
scan.setFilter(combined);
} else {
scan.setFilter(dequeueFilter);
}
return super.preScannerOpen(e, scan, s);
}
use of org.apache.hadoop.hbase.filter.FilterList in project cdap by caskdata.
the class Filters method combine.
/**
* Adds {@code overrideFilter} on to {@code baseFilter}, if it exists, otherwise replaces it.
*/
public static Filter combine(Filter overrideFilter, Filter baseFilter) {
if (baseFilter != null) {
FilterList filterList = new FilterList(FilterList.Operator.MUST_PASS_ALL);
filterList.addFilter(baseFilter);
filterList.addFilter(overrideFilter);
return filterList;
}
return overrideFilter;
}
Aggregations