|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.filter.Filter
org.apache.hadoop.hbase.filter.FilterBase
org.apache.hadoop.hbase.filter.CompareFilter
org.apache.hadoop.hbase.filter.DependentColumnFilter
@InterfaceAudience.Public @InterfaceStability.Stable public class DependentColumnFilter
A filter for adding inter-column timestamp matching Only cells with a correspondingly timestamped entry in the target column will be retained Not compatible with Scan.setBatch as operations need full rows for correct filtering
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.filter.CompareFilter |
---|
CompareFilter.CompareOp |
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.filter.Filter |
---|
Filter.ReturnCode |
Field Summary | |
---|---|
protected byte[] |
columnFamily
|
protected byte[] |
columnQualifier
|
protected boolean |
dropDependentColumn
|
protected Set<Long> |
stampSet
|
Fields inherited from class org.apache.hadoop.hbase.filter.CompareFilter |
---|
comparator, compareOp |
Fields inherited from class org.apache.hadoop.hbase.filter.Filter |
---|
reversed |
Constructor Summary | |
---|---|
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)
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 |
Method Summary | |
---|---|
static Filter |
createFilterFromArguments(ArrayList<byte[]> filterArguments)
|
boolean |
dropDependentColumn()
|
boolean |
filterAllRemaining()
Filters that never filter all remaining can inherit this implementation that never stops the filter early. |
Filter.ReturnCode |
filterKeyValue(Cell c)
Filters that dont filter by key value can inherit this implementation that includes all Cells. |
boolean |
filterRow()
Filters that never filter by rows based on previously gathered state from FilterBase.filterKeyValue(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. |
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. |
Methods inherited from class org.apache.hadoop.hbase.filter.CompareFilter |
---|
doCompare, extractArguments, getComparator, getOperator |
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase |
---|
filterRow, getNextCellHint, getNextKeyHint, isFamilyEssential, transform, transformCell |
Methods inherited from class org.apache.hadoop.hbase.filter.Filter |
---|
isReversed, setReversed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected byte[] columnFamily
protected byte[] columnQualifier
protected boolean dropDependentColumn
protected Set<Long> stampSet
Constructor Detail |
---|
public DependentColumnFilter(byte[] family, byte[] qualifier, boolean dropDependentColumn, CompareFilter.CompareOp valueCompareOp, ByteArrayComparable valueComparator)
CompareFilter
family
- dependent column familyqualifier
- dependent column qualifierdropDependentColumn
- whether the column should be discarded aftervalueCompareOp
- 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 discardedMethod Detail |
---|
public byte[] getFamily()
public byte[] getQualifier()
public boolean dropDependentColumn()
public boolean getDropDependentColumn()
public boolean filterAllRemaining()
org.apache.hadoop.hbase.filter.FilterBase
filterAllRemaining
in class org.apache.hadoop.hbase.filter.FilterBase
public Filter.ReturnCode filterKeyValue(Cell c)
org.apache.hadoop.hbase.filter.FilterBase
filterKeyValue
in class org.apache.hadoop.hbase.filter.FilterBase
c
- the Cell in question
Filter.ReturnCode
public void filterRowCells(List<Cell> kvs)
org.apache.hadoop.hbase.filter.FilterBase
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
FilterBase.filterKeyValue(Cell)
can inherit this implementation that
never filters a row.
filterRow
in class org.apache.hadoop.hbase.filter.FilterBase
public boolean filterRowKey(byte[] buffer, int offset, int length)
org.apache.hadoop.hbase.filter.FilterBase
filterRowKey
in class org.apache.hadoop.hbase.filter.FilterBase
buffer
- buffer containing row keyoffset
- offset into buffer where row key startslength
- length of the row key
public void reset()
org.apache.hadoop.hbase.filter.FilterBase
reset
in class org.apache.hadoop.hbase.filter.FilterBase
public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
public byte[] toByteArray()
org.apache.hadoop.hbase.filter.FilterBase
toByteArray
in class org.apache.hadoop.hbase.filter.FilterBase
public static DependentColumnFilter parseFrom(byte[] pbBytes) throws org.apache.hadoop.hbase.exceptions.DeserializationException
pbBytes
- A pb serialized DependentColumnFilter
instance
DependentColumnFilter
made from bytes
org.apache.hadoop.hbase.exceptions.DeserializationException
toByteArray()
public String toString()
org.apache.hadoop.hbase.filter.FilterBase
toString
in class CompareFilter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |