|
||||||||||
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 |
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(KeyValue v)
Filters that dont filter by key value can inherit this implementation that includes all KeyValues. |
boolean |
filterRow()
Filters that never filter by rows based on previously gathered state from FilterBase.filterKeyValue(KeyValue) can inherit this implementation that
never filters a row. |
void |
filterRow(List<KeyValue> kvs)
Filters that never filter by modifying the returned List of KeyValues 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 KeyValues 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 |
---|
getNextKeyHint, isFamilyEssential, transform |
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 keyvalues should be discardedMethod Detail |
---|
public byte[] getFamily()
public byte[] getQualifier()
public boolean dropDependentColumn()
public boolean getDropDependentColumn()
public boolean filterAllRemaining()
FilterBase
filterAllRemaining
in class FilterBase
public Filter.ReturnCode filterKeyValue(KeyValue v)
FilterBase
filterKeyValue
in class FilterBase
v
- the KeyValue in question
Filter.ReturnCode
public void filterRow(List<KeyValue> kvs)
FilterBase
filterRow
in class FilterBase
kvs
- the list of keyvalues to be filteredpublic boolean hasFilterRow()
FilterBase
hasFilterRow
in class FilterBase
public boolean filterRow()
FilterBase
FilterBase.filterKeyValue(KeyValue)
can inherit this implementation that
never filters a row.
filterRow
in class FilterBase
public boolean filterRowKey(byte[] buffer, int offset, int length)
FilterBase
filterRowKey
in class FilterBase
buffer
- buffer containing row keyoffset
- offset into buffer where row key startslength
- length of the row key
public void reset()
FilterBase
reset
in class FilterBase
public static Filter createFilterFromArguments(ArrayList<byte[]> filterArguments)
public byte[] toByteArray()
FilterBase
toByteArray
in class FilterBase
public static DependentColumnFilter parseFrom(byte[] pbBytes) throws DeserializationException
pbBytes
- A pb serialized DependentColumnFilter
instance
DependentColumnFilter
made from bytes
DeserializationException
toByteArray()
public String toString()
FilterBase
toString
in class CompareFilter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |