From b0f157c89b54bf38d5ab78f224af890cbb1de859 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Thu, 14 Aug 2014 10:24:13 -0700 Subject: [PATCH] HBASE-11745 FilterAllFilter should return ReturnCode.SKIP --- .../org/apache/hadoop/hbase/filter/FilterAllFilter.java | 17 ++--------------- 1 file changed, 2 insertions(+), 15 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..de32350 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,21 +29,11 @@ public class FilterAllFilter extends FilterBase { @Override public ReturnCode filterKeyValue(Cell v) throws IOException { - return ReturnCode.INCLUDE; - } - - @Override - public boolean filterRow() throws IOException { - return true; + return ReturnCode.SKIP; } 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)