@InterfaceAudience.Public public class DependentColumnFilter extends CompareFilter
CompareFilter.CompareOpFilter.ReturnCode| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
columnFamily |
protected byte[] |
columnQualifier |
protected boolean |
dropDependentColumn |
protected Set<Long> |
stampSet |
comparator, op| Constructor and Description |
|---|
DependentColumnFilter(byte[] family,
byte[] qualifier)
Constructor for DependentColumn filter.
|
DependentColumnFilter(byte[] family,
byte[] qualifier,
boolean dropDependentColumn)
Constructor for DependentColumn filter.
|
DependentColumnFilter(byte[] family,
byte[] qualifier,
boolean dropDependentColumn,
CompareFilter.CompareOp valueCompareOp,
ByteArrayComparable valueComparator)
Deprecated.
Since 2.0.0. Will be removed in 3.0.0. Use
DependentColumnFilter(byte[], byte[], boolean, CompareOperator, ByteArrayComparable)
instead. |
DependentColumnFilter(byte[] family,
byte[] qualifier,
boolean dropDependentColumn,
CompareOperator op,
ByteArrayComparable valueComparator)
Build a dependent column filter with value checking
dependent column varies will be compared using the supplied
compareOp and comparator, for usage of which
refer to
CompareFilter |
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean |
areSerializedFieldsEqual(Filter o)
Default implementation so that writers of custom filters aren't forced to implement.
|
static Filter |
createFilterFromArguments(ArrayList<byte[]> filterArguments) |
boolean |
dropDependentColumn() |
boolean |
equals(Object obj) |
boolean |
filterAllRemaining()
Filters that never filter all remaining can inherit this implementation that
never stops the filter early.
|
Filter.ReturnCode |
filterCell(Cell c)
A way to filter based on the column family, column qualifier and/or the column value.
|
Filter.ReturnCode |
filterKeyValue(Cell c)
Deprecated.
|
boolean |
filterRow()
Filters that never filter by rows based on previously gathered state from
Filter.filterCell(Cell) can inherit this implementation that
never filters a row. |
void |
filterRowCells(List<Cell> kvs)
Filters that never filter by modifying the returned List of Cells can
inherit this implementation that does nothing.
|
boolean |
filterRowKey(byte[] buffer,
int offset,
int length)
Filters that do not filter by row key can inherit this implementation that
never filters anything.
|
boolean |
getDropDependentColumn() |
byte[] |
getFamily() |
byte[] |
getQualifier() |
boolean |
hasFilterRow()
Fitlers that never filter by modifying the returned List of Cells can
inherit this implementation that does nothing.
|
int |
hashCode() |
static DependentColumnFilter |
parseFrom(byte[] pbBytes) |
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.
|
compare, compare, compareFamily, compareFamily, compareQualifier, compareQualifier, compareRow, compareRow, compareValue, compareValue, convert, extractArguments, filterRowKey, getComparator, getCompareOperator, getOperatorgetNextCellHint, isFamilyEssential, transformCellisReversed, setReversedprotected byte[] columnFamily
protected byte[] columnQualifier
protected boolean dropDependentColumn
@Deprecated public DependentColumnFilter(byte[] family, byte[] qualifier, boolean dropDependentColumn, CompareFilter.CompareOp valueCompareOp, ByteArrayComparable valueComparator)
DependentColumnFilter(byte[], byte[], boolean, CompareOperator, ByteArrayComparable)
instead.CompareFilterfamily - dependent column familyqualifier - dependent column qualifierdropDependentColumn - whether the column should be discarded aftervalueCompareOp - comparison opvalueComparator - comparatorpublic DependentColumnFilter(byte[] family, byte[] qualifier, boolean dropDependentColumn, CompareOperator op, ByteArrayComparable valueComparator)
CompareFilterfamily - dependent column familyqualifier - dependent column qualifierdropDependentColumn - whether the column should be discarded afterop - Value comparison opvalueComparator - comparatorpublic DependentColumnFilter(byte[] family, byte[] qualifier)
family - name of target column familyqualifier - name of column qualifierpublic DependentColumnFilter(byte[] family, byte[] qualifier, boolean dropDependentColumn)
family - name of dependent column familyqualifier - name of dependent qualifierdropDependentColumn - whether the dependent columns Cells should be discardedpublic byte[] getFamily()
public byte[] getQualifier()
public boolean dropDependentColumn()
public boolean getDropDependentColumn()
public boolean filterAllRemaining()
FilterBaseIOException.filterAllRemaining in class FilterBase@Deprecated public Filter.ReturnCode filterKeyValue(Cell c)
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.filterKeyValue in class Filterc - the Cell in questionFilter.ReturnCodepublic Filter.ReturnCode filterCell(Cell c)
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 questionFilter.ReturnCodepublic void filterRowCells(List<Cell> kvs)
FilterBaseIOException.filterRowCells in class FilterBasekvs - the list of Cells to be filteredpublic boolean hasFilterRow()
FilterBasehasFilterRow in class FilterBasepublic boolean filterRow()
FilterBaseFilter.filterCell(Cell) can inherit this implementation that
never filters a row.
Last chance to veto row based on previous Filter.filterCell(Cell) calls. The filter
needs to retain state then return a particular value for this call if they wish to exclude a
row if a certain column is missing (for example).
Concrete implementers can signal a failure condition in their code by throwing an
IOException.filterRow in class FilterBasepublic boolean filterRowKey(byte[] buffer, int offset, int length)
FilterBaseFilter.filterCell(Cell) below.
Concrete implementers can signal a failure condition in their code by throwing an
IOException.filterRowKey in class FilterBasebuffer - buffer containing row keyoffset - offset into buffer where row key startslength - length of the row keypublic void reset()
FilterBaseIOException.reset in class FilterBasepublic static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
public byte[] toByteArray()
FilterBasetoByteArray in class FilterBasepublic static DependentColumnFilter parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes - A pb serialized DependentColumnFilter instanceDependentColumnFilter made from bytesDeserializationExceptiontoByteArray()boolean areSerializedFieldsEqual(Filter o)
FilterBaseareSerializedFieldsEqual in class CompareFiltero - public String toString()
FilterBasetoString in class CompareFilterpublic boolean equals(Object obj)
equals in class CompareFilterpublic int hashCode()
hashCode in class CompareFilterCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.