hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [1/6] git commit: HBASE-11745 FilterAllFilter should return ReturnCode.SKIP
Date Thu, 14 Aug 2014 18:45:23 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 9740bf656 -> 3d292e8d7
  refs/heads/branch-1 2eb075730 -> a79e5ce52
  refs/heads/master cabcb6ca2 -> 819b06d62


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/1e55bdbf
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1e55bdbf
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1e55bdbf

Branch: refs/heads/master
Commit: 1e55bdbf7781cb705ff4d3ef1fdc31fb60e59bd8
Parents: cabcb6c
Author: Andrew Purtell <apurtell@apache.org>
Authored: Thu Aug 14 11:42:30 2014 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Thu Aug 14 11:42:30 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/1e55bdbf/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