HBASE-11745 FilterAllFilter should return ReturnCode.SKIP

This commit is contained in:
Andrew Purtell 2014-08-14 11:42:30 -07:00
parent cabcb6ca23
commit 1e55bdbf77
1 changed files with 7 additions and 10 deletions

View File

@ -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();
}