From 27bc815ed5c0df137b980521374b2280817a7b04 Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Mon, 11 Feb 2013 21:04:10 +0000 Subject: [PATCH] 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 --- .../main/java/org/apache/hadoop/hbase/filter/FilterList.java | 5 ++--- .../java/org/apache/hadoop/hbase/filter/TestFilterList.java | 4 ---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java index a272c371643..0d218538a7d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java @@ -263,12 +263,11 @@ public class FilterList extends Filter { public boolean filterRow() { for (Filter filter : filters) { if (operator == Operator.MUST_PASS_ALL) { - if (filter.filterAllRemaining() || filter.filterRow()) { + if (filter.filterRow()) { return true; } } else if (operator == Operator.MUST_PASS_ONE) { - if (!filter.filterAllRemaining() - && !filter.filterRow()) { + if (!filter.filterRow()) { return false; } } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java index 02d56b2dc30..abe4a372656 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java @@ -140,7 +140,6 @@ public class TestFilterList { /* We should filter any row */ rowkey = Bytes.toBytes("z"); assertTrue(filterMPONE.filterRowKey(rowkey, 0, rowkey.length)); - assertTrue(filterMPONE.filterRow()); assertTrue(filterMPONE.filterAllRemaining()); } @@ -191,9 +190,6 @@ public class TestFilterList { // Should fail here; row should be filtered out. KeyValue kv = new KeyValue(rowkey, rowkey, rowkey, rowkey); assertTrue(Filter.ReturnCode.NEXT_ROW == filterMPALL.filterKeyValue(kv)); - - // Both filters in Set should be satisfied by now - assertTrue(filterMPALL.filterRow()); } /**