hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [2/6] git commit: HBASE-11745 FilterAllFilter should return ReturnCode.SKIP
Date Thu, 14 Aug 2014 18:45:24 GMT
HBASE-11745 FilterAllFilter should return ReturnCode.SKIP


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/1f5ee71d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1f5ee71d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1f5ee71d

Branch: refs/heads/branch-1
Commit: 1f5ee71d0fdd826c5f18fbabd8fea312ca187dc2
Parents: 2eb0757
Author: Andrew Purtell <apurtell@apache.org>
Authored: Thu Aug 14 11:42:31 2014 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Thu Aug 14 11:42:31 2014 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/filter/FilterAllFilter.java       | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/1f5ee71d/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/FilterAllFilter.java
----------------------------------------------------------------------
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();
   }
 


Mime
View raw message