From b6bd811c76f861b0ffaf4aeb1fc8c5a2465a8a06 Mon Sep 17 00:00:00 2001 From: tedyu Date: Tue, 22 Sep 2015 10:00:50 -0700 Subject: [PATCH] HBASE-14397 Revert pending review comments --- .../org/apache/hadoop/hbase/filter/PrefixFilter.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java index 7e356738acc..8a62b9b31f2 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/PrefixFilter.java @@ -40,11 +40,9 @@ import com.google.protobuf.InvalidProtocolBufferException; @InterfaceAudience.Public @InterfaceStability.Stable public class PrefixFilter extends FilterBase { - public static final int MAX_SKIPPED_COMPARE_ROW_NUM = 100; protected byte [] prefix = null; protected boolean passedPrefix = false; protected boolean filterRow = true; - protected int skippedCompareRows = 0; public PrefixFilter(final byte [] prefix) { this.prefix = prefix; @@ -58,12 +56,7 @@ public class PrefixFilter extends FilterBase { if (firstRowCell == null || this.prefix == null) return true; int length = firstRowCell.getRowLength(); - if (length < prefix.length && skippedCompareRows < MAX_SKIPPED_COMPARE_ROW_NUM) { - ++skippedCompareRows; - return true; - } - skippedCompareRows = 0; - + if (length < prefix.length) return true; // if they are equal, return false => pass row // else return true, filter row // if we are passed the prefix, set flag