@InterfaceAudience.Public public class ColumnValueFilter extends org.apache.hadoop.hbase.filter.FilterBase
SingleColumnValueFilter which returns an entire row when specified
condition is matched, ColumnValueFilter return the matched cell only.
This filter is used to filter cells based on column and value. It takes a
CompareOperator operator (<, <=, =, !=, >, >=), and and a
ByteArrayComparable comparator.
Filter.ReturnCode| Constructor and Description |
|---|
ColumnValueFilter(byte[] family,
byte[] qualifier,
CompareOperator op,
byte[] value) |
ColumnValueFilter(byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator) |
| Modifier and Type | Method and Description |
|---|---|
static Filter |
createFilterFromArguments(ArrayList<byte[]> filterArguments)
Creating this filter by reflection, it is used by
ParseFilter, |
boolean |
equals(Object obj) |
Filter.ReturnCode |
filterCell(Cell c)
A way to filter based on the column family, column qualifier and/or the column value.
|
boolean |
filterRowKey(Cell cell)
Filters a row based on the row key.
|
ByteArrayComparable |
getComparator()
Returns the comparator
|
CompareOperator |
getCompareOperator()
n
|
byte[] |
getFamily()
Returns the column family
|
byte[] |
getQualifier()
Returns the qualifier
|
int |
hashCode() |
boolean |
isFamilyEssential(byte[] name)
By default, we require all scan's column families to be present.
|
static ColumnValueFilter |
parseFrom(byte[] pbBytes)
Parse a serialized representation of
ColumnValueFilter |
void |
reset()
Filters that are purely stateless and do nothing in their reset() methods can inherit this
null/empty implementation.
|
byte[] |
toByteArray()
Return length 0 byte array for Filters that don't require special serialization
|
String |
toString()
Return filter's info for debugging and logging purpose.
|
filterAllRemaining, filterRow, filterRowCells, filterRowKey, getNextCellHint, hasFilterRow, transformCellfilterKeyValue, isReversed, setReversedpublic ColumnValueFilter(byte[] family, byte[] qualifier, CompareOperator op, byte[] value)
public ColumnValueFilter(byte[] family, byte[] qualifier, CompareOperator op, ByteArrayComparable comparator)
public CompareOperator getCompareOperator()
public ByteArrayComparable getComparator()
public byte[] getFamily()
public byte[] getQualifier()
public void reset() throws IOException
org.apache.hadoop.hbase.filter.FilterBaseIOException.reset in class org.apache.hadoop.hbase.filter.FilterBaseIOException - in case an I/O or an filter specific failure needs to be signaled.public boolean filterRowKey(Cell cell) throws IOException
FilterFilter.filterCell(Cell) below. If
Filter.filterAllRemaining() returns true, then Filter.filterRowKey(Cell) should also return
true. Concrete implementers can signal a failure condition in their code by throwing an
IOException.filterRowKey in class org.apache.hadoop.hbase.filter.FilterBasecell - The first cell coming in the new rowIOException - in case an I/O or an filter specific failure needs to be signaled.public Filter.ReturnCode filterCell(Cell c) throws IOException
FilterReturnCode.NEXT_ROW, it should return
ReturnCode.NEXT_ROW until Filter.reset() is called just in case the caller calls
for the next row. Concrete implementers can signal a failure condition in their code by
throwing an IOException.filterCell in class Filterc - the Cell in questionIOException - in case an I/O or an filter specific failure needs to be signaled.Filter.ReturnCodepublic static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
ParseFilter,filterArguments - arguments for creating a ColumnValueFilterpublic static ColumnValueFilter parseFrom(byte[] pbBytes) throws org.apache.hadoop.hbase.exceptions.DeserializationException
ColumnValueFilterpbBytes - A pb serialized ColumnValueFilter instanceColumnValueFilter made from bytesorg.apache.hadoop.hbase.exceptions.DeserializationException - if an error occurredtoByteArray()public byte[] toByteArray() throws IOException
org.apache.hadoop.hbase.filter.FilterBasetoByteArray in class org.apache.hadoop.hbase.filter.FilterBaseIOException - in case an I/O or an filter specific failure needs to be signaled.public boolean isFamilyEssential(byte[] name) throws IOException
org.apache.hadoop.hbase.filter.FilterBaseIOException.isFamilyEssential in class org.apache.hadoop.hbase.filter.FilterBaseIOException - in case an I/O or an filter specific failure needs to be signaled.public String toString()
org.apache.hadoop.hbase.filter.FilterBasetoString in class org.apache.hadoop.hbase.filter.FilterBaseCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.