Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 827451186B for ; Thu, 14 Aug 2014 18:45:25 +0000 (UTC) Received: (qmail 50407 invoked by uid 500); 14 Aug 2014 18:45:24 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 50334 invoked by uid 500); 14 Aug 2014 18:45:24 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 50157 invoked by uid 99); 14 Aug 2014 18:45:24 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Aug 2014 18:45:24 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id F1CB69C37A7; Thu, 14 Aug 2014 18:45:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: apurtell@apache.org To: commits@hbase.apache.org Date: Thu, 14 Aug 2014 18:45:23 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/6] git commit: HBASE-11745 FilterAllFilter should return ReturnCode.SKIP 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 Authored: Thu Aug 14 11:42:30 2014 -0700 Committer: Andrew Purtell 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(); }