From a7ead8459fc2a1fd53c62e607f016de845fff0e3 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Thu, 14 Aug 2014 10:27:15 -0700 Subject: [PATCH] HBASE-11745 FilterAllFilter should return ReturnCode.SKIP --- .../org/apache/hadoop/hbase/filter/FilterAllFilter.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/FilterAllFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/FilterAllFilter.java index 13abb9e..a104def 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/FilterAllFilter.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/FilterAllFilter.java @@ -21,9 +21,6 @@ import java.io.IOException; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.exceptions.DeserializationException; -import org.apache.hadoop.hbase.protobuf.generated.FilterProtos; - -import com.google.protobuf.InvalidProtocolBufferException; public class FilterAllFilter extends FilterBase { @@ -32,7 +29,12 @@ public class FilterAllFilter extends FilterBase { @Override public ReturnCode filterKeyValue(Cell v) throws IOException { - return ReturnCode.INCLUDE; + return ReturnCode.SKIP; + } + + @Override + public boolean hasFilterRow() { + return true; } @Override @@ -41,12 +43,7 @@ public class FilterAllFilter extends FilterBase { } public static FilterAllFilter parseFrom(final byte[] pbBytes) throws DeserializationException { - FilterProtos.FilterAllFilter proto; - try { - proto = FilterProtos.FilterAllFilter.parseFrom(pbBytes); - } catch (InvalidProtocolBufferException e) { - throw new DeserializationException(e); - } + // No options to parse, so why bother return new FilterAllFilter(); } -- 1.8.5.2 (Apple Git-48)