HBASE-14397 Revert pending review comments

This commit is contained in:
tedyu 2015-09-22 10:00:50 -07:00
parent 7b9d88f9d7
commit b6bd811c76
1 changed files with 1 additions and 8 deletions

View File

@ -40,11 +40,9 @@ import com.google.protobuf.InvalidProtocolBufferException;
@InterfaceAudience.Public @InterfaceAudience.Public
@InterfaceStability.Stable @InterfaceStability.Stable
public class PrefixFilter extends FilterBase { public class PrefixFilter extends FilterBase {
public static final int MAX_SKIPPED_COMPARE_ROW_NUM = 100;
protected byte [] prefix = null; protected byte [] prefix = null;
protected boolean passedPrefix = false; protected boolean passedPrefix = false;
protected boolean filterRow = true; protected boolean filterRow = true;
protected int skippedCompareRows = 0;
public PrefixFilter(final byte [] prefix) { public PrefixFilter(final byte [] prefix) {
this.prefix = prefix; this.prefix = prefix;
@ -58,12 +56,7 @@ public class PrefixFilter extends FilterBase {
if (firstRowCell == null || this.prefix == null) if (firstRowCell == null || this.prefix == null)
return true; return true;
int length = firstRowCell.getRowLength(); int length = firstRowCell.getRowLength();
if (length < prefix.length && skippedCompareRows < MAX_SKIPPED_COMPARE_ROW_NUM) { if (length < prefix.length) return true;
++skippedCompareRows;
return true;
}
skippedCompareRows = 0;
// if they are equal, return false => pass row // if they are equal, return false => pass row
// else return true, filter row // else return true, filter row
// if we are passed the prefix, set flag // if we are passed the prefix, set flag