HBASE-11745 FilterAllFilter should return ReturnCode.SKIP
This commit is contained in:
parent
cabcb6ca23
commit
1e55bdbf77
|
@ -21,9 +21,6 @@ import java.io.IOException;
|
||||||
|
|
||||||
import org.apache.hadoop.hbase.Cell;
|
import org.apache.hadoop.hbase.Cell;
|
||||||
import org.apache.hadoop.hbase.exceptions.DeserializationException;
|
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 {
|
public class FilterAllFilter extends FilterBase {
|
||||||
|
|
||||||
|
@ -32,7 +29,12 @@ public class FilterAllFilter extends FilterBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ReturnCode filterKeyValue(Cell v) throws IOException {
|
public ReturnCode filterKeyValue(Cell v) throws IOException {
|
||||||
return ReturnCode.INCLUDE;
|
return ReturnCode.SKIP;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasFilterRow() {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -41,12 +43,7 @@ public class FilterAllFilter extends FilterBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FilterAllFilter parseFrom(final byte[] pbBytes) throws DeserializationException {
|
public static FilterAllFilter parseFrom(final byte[] pbBytes) throws DeserializationException {
|
||||||
FilterProtos.FilterAllFilter proto;
|
// No options to parse, so why bother
|
||||||
try {
|
|
||||||
proto = FilterProtos.FilterAllFilter.parseFrom(pbBytes);
|
|
||||||
} catch (InvalidProtocolBufferException e) {
|
|
||||||
throw new DeserializationException(e);
|
|
||||||
}
|
|
||||||
return new FilterAllFilter();
|
return new FilterAllFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue