@InterfaceAudience.Public public class ColumnValueFilter extends 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| 构造器和说明 |
|---|
ColumnValueFilter(byte[] family,
byte[] qualifier,
CompareOperator op,
byte[] value) |
ColumnValueFilter(byte[] family,
byte[] qualifier,
CompareOperator op,
ByteArrayComparable comparator) |
| 限定符和类型 | 方法和说明 |
|---|---|
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() |
CompareOperator |
getCompareOperator() |
byte[] |
getFamily() |
byte[] |
getQualifier() |
int |
hashCode() |
boolean |
isFamilyEssential(byte[] name)
By default, we require all scan's column families to be present.
|
static ColumnValueFilter |
parseFrom(byte[] pbBytes)
Parse protobuf bytes to a 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
FilterBaseIOException.reset 在类中 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 在类中 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 在类中 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 DeserializationException
pbBytes - pbBytesDeserializationException - deserialization exceptionpublic byte[] toByteArray()
throws IOException
FilterBasetoByteArray 在类中 FilterBaseIOException - in case an I/O or an filter specific failure needs to be signaled.public boolean isFamilyEssential(byte[] name)
throws IOException
FilterBaseIOException.isFamilyEssential 在类中 FilterBaseIOException - in case an I/O or an filter specific failure needs to be signaled.public String toString()
FilterBasetoString 在类中 FilterBaseCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.