@InterfaceAudience.Public public class DependentColumnFilter extends CompareFilter
Filter.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,
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 |
---|---|
static Filter |
createFilterFromArguments(ArrayList<byte[]> filterArguments) |
boolean |
dropDependentColumn()
Returns true if we should drop the dependent column, false otherwise
|
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.
|
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 |
getDropDependentColumn() |
byte[] |
getFamily()
Returns the column family
|
byte[] |
getQualifier()
Returns the column qualifier
|
boolean |
hasFilterRow()
Filters that never filter by modifying the returned List of Cells can inherit this
implementation that does nothing.
|
int |
hashCode() |
static DependentColumnFilter |
parseFrom(byte[] pbBytes)
Parse a seralized representation of
DependentColumnFilter |
void |
reset()
Filters that are purely stateless and do nothing in their reset() methods can inherit this
null/empty implementation.
|
byte[] |
toByteArray()
Returns The filter serialized using pb
|
String |
toString()
Return filter's info for debugging and logging purpose.
|
compareFamily, compareQualifier, compareRow, compareValue, extractArguments, filterRowKey, getComparator, getCompareOperator
getNextCellHint, isFamilyEssential, transformCell
isReversed, setReversed
protected byte[] columnFamily
protected byte[] columnQualifier
protected boolean dropDependentColumn
public DependentColumnFilter(byte[] family, byte[] qualifier, boolean dropDependentColumn, CompareOperator op, ByteArrayComparable valueComparator)
CompareFilter
family
- 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()
org.apache.hadoop.hbase.filter.FilterBase
IOException
.filterAllRemaining
in class org.apache.hadoop.hbase.filter.FilterBase
public Filter.ReturnCode filterCell(Cell c)
Filter
ReturnCode.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 Filter
c
- the Cell in questionFilter.ReturnCode
public void filterRowCells(List<Cell> kvs)
org.apache.hadoop.hbase.filter.FilterBase
IOException
.filterRowCells
in class org.apache.hadoop.hbase.filter.FilterBase
kvs
- the list of Cells to be filteredpublic boolean hasFilterRow()
org.apache.hadoop.hbase.filter.FilterBase
hasFilterRow
in class org.apache.hadoop.hbase.filter.FilterBase
public boolean filterRow()
org.apache.hadoop.hbase.filter.FilterBase
Filter.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 org.apache.hadoop.hbase.filter.FilterBase
public void reset()
org.apache.hadoop.hbase.filter.FilterBase
IOException
.reset
in class org.apache.hadoop.hbase.filter.FilterBase
public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
public byte[] toByteArray()
toByteArray
in class org.apache.hadoop.hbase.filter.FilterBase
public static DependentColumnFilter parseFrom(byte[] pbBytes) throws org.apache.hadoop.hbase.exceptions.DeserializationException
DependentColumnFilter
pbBytes
- A pb serialized DependentColumnFilter
instanceDependentColumnFilter
made from bytes
org.apache.hadoop.hbase.exceptions.DeserializationException
- if an error occurredtoByteArray()
public String toString()
org.apache.hadoop.hbase.filter.FilterBase
toString
in class CompareFilter
public boolean equals(Object obj)
equals
in class CompareFilter
public int hashCode()
hashCode
in class CompareFilter
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.