HBASE-6132 ColumnCountGetFilter & PageFilter not working with FilterList (Anoop)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1444962 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
538abfe0d8
commit
27bc815ed5
|
@ -263,12 +263,11 @@ public class FilterList extends Filter {
|
||||||
public boolean filterRow() {
|
public boolean filterRow() {
|
||||||
for (Filter filter : filters) {
|
for (Filter filter : filters) {
|
||||||
if (operator == Operator.MUST_PASS_ALL) {
|
if (operator == Operator.MUST_PASS_ALL) {
|
||||||
if (filter.filterAllRemaining() || filter.filterRow()) {
|
if (filter.filterRow()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (operator == Operator.MUST_PASS_ONE) {
|
} else if (operator == Operator.MUST_PASS_ONE) {
|
||||||
if (!filter.filterAllRemaining()
|
if (!filter.filterRow()) {
|
||||||
&& !filter.filterRow()) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,6 @@ public class TestFilterList {
|
||||||
/* We should filter any row */
|
/* We should filter any row */
|
||||||
rowkey = Bytes.toBytes("z");
|
rowkey = Bytes.toBytes("z");
|
||||||
assertTrue(filterMPONE.filterRowKey(rowkey, 0, rowkey.length));
|
assertTrue(filterMPONE.filterRowKey(rowkey, 0, rowkey.length));
|
||||||
assertTrue(filterMPONE.filterRow());
|
|
||||||
assertTrue(filterMPONE.filterAllRemaining());
|
assertTrue(filterMPONE.filterAllRemaining());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -191,9 +190,6 @@ public class TestFilterList {
|
||||||
// Should fail here; row should be filtered out.
|
// Should fail here; row should be filtered out.
|
||||||
KeyValue kv = new KeyValue(rowkey, rowkey, rowkey, rowkey);
|
KeyValue kv = new KeyValue(rowkey, rowkey, rowkey, rowkey);
|
||||||
assertTrue(Filter.ReturnCode.NEXT_ROW == filterMPALL.filterKeyValue(kv));
|
assertTrue(Filter.ReturnCode.NEXT_ROW == filterMPALL.filterKeyValue(kv));
|
||||||
|
|
||||||
// Both filters in Set should be satisfied by now
|
|
||||||
assertTrue(filterMPALL.filterRow());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue