Author: larsh
Date: Thu Oct 17 20:10:22 2013
New Revision: 1533239
URL: http://svn.apache.org/r1533239
Log:
HBASE-9747 PrefixFilter with OR condition gives wrong results (Aditya Kishore)
Modified:
hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java
Modified:
hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java
URL:
http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java?rev=1533239&r1=1533238&r2=1533239&view=diff
==============================================================================
---
hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java
(original)
+++
hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java
Thu Oct 17 20:10:22 2013
@@ -38,6 +38,7 @@ import java.util.ArrayList;
public class PrefixFilter extends FilterBase {
protected byte [] prefix = null;
protected boolean passedPrefix = false;
+ protected boolean filterRow = true;
public PrefixFilter(final byte [] prefix) {
this.prefix = prefix;
@@ -60,7 +61,16 @@ public class PrefixFilter extends Filter
if(cmp > 0) {
passedPrefix = true;
}
- return cmp != 0;
+ filterRow = (cmp != 0);
+ return filterRow;
+ }
+
+ public boolean filterRow() {
+ return filterRow;
+ }
+
+ public void reset() {
+ filterRow = true;
}
public boolean filterAllRemaining() {