Skip to content

Commit

Permalink
HACK! Revert "HBASE-17678 FilterList with MUST_PASS_ONE lead to redun…
Browse files Browse the repository at this point in the history
…dancy cells returned - addendum"

This commit caused an issue upstream which led to a failing pig smoke test.
Family filters with OR does not work. HBASE-18410
Ref: CDH-56405

This reverts commit 347bef8.
  • Loading branch information
petersomogyi committed Jul 26, 2017
1 parent fec2d96 commit 8385bdc
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.CellComparator;
import org.apache.hadoop.hbase.CellUtil;
import org.apache.hadoop.hbase.KeyValueUtil;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.hbase.exceptions.DeserializationException;
import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
Expand Down Expand Up @@ -145,7 +144,7 @@ public FilterList(final Operator operator, final Filter... rowFilters) {

public void initPrevListForMustPassOne(int size) {
if (operator == Operator.MUST_PASS_ONE) {
if (this.prevFilterRCList == null) {
if (this.prevCellList == null) {
prevFilterRCList = new ArrayList<>(Collections.nCopies(size, null));
}
if (this.prevCellList == null) {
Expand Down Expand Up @@ -404,14 +403,7 @@ public ReturnCode filterKeyValue(Cell c) throws IOException {
ReturnCode localRC = filter.filterKeyValue(c);
// Update previous cell and return code we encountered.
prevFilterRCList.set(i, localRC);
if (c == null || localRC == ReturnCode.INCLUDE || localRC == ReturnCode.SKIP) {
// If previous return code is INCLUDE or SKIP, we should always pass the next cell to the
// corresponding sub-filter(need not test shouldPassCurrentCellToFilter() method), So we
// need not save current cell to prevCellList for saving heap memory.
prevCellList.set(i, null);
} else {
prevCellList.set(i, KeyValueUtil.toNewKeyCell(c));
}
prevCellList.set(i, c);

if (localRC != ReturnCode.SEEK_NEXT_USING_HINT) {
seenNonHintReturnCode = true;
Expand Down

0 comments on commit 8385bdc

Please sign in to comment.