|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.filter.ColumnValueFilter
public class ColumnValueFilter
This filter is used to filter based on the value of a given column. It takes an operator (equal, greater, not equal, etc) and either a byte [] value or a byte [] comparator. If we have a byte [] value then we just do a lexicographic compare. If this is not sufficient (eg you want to deserialize a long and then compare it to a fixed long value, then you can pass in your own comparator instead.
Nested Class Summary | |
---|---|
static class |
ColumnValueFilter.CompareOp
Comparison operator. |
Constructor Summary | |
---|---|
ColumnValueFilter(byte[] columnName,
ColumnValueFilter.CompareOp compareOp,
byte[] value)
Constructor. |
|
ColumnValueFilter(byte[] columnName,
ColumnValueFilter.CompareOp compareOp,
WritableByteArrayComparable comparator)
Constructor. |
Method Summary | |
---|---|
boolean |
filterAllRemaining()
Determines if the filter has decided that all remaining results should be filtered (skipped). |
boolean |
filterColumn(byte[] rowKey,
byte[] colKey,
byte[] data)
Filters on row key, column name, and column value. |
boolean |
filterRow(SortedMap<byte[],Cell> columns)
Filter on the fully assembled row. |
boolean |
filterRowKey(byte[] rowKey)
Filters on just a row key. |
boolean |
processAlways()
Returns whether or not the filter should always be processed in any filtering call. |
void |
readFields(DataInput in)
|
void |
reset()
Resets the state of the filter. |
void |
rowProcessed(boolean filtered,
byte[] key)
Called to let filter know the final decision (to pass or filter) on a given row. |
void |
validate(byte[][] columns)
Validates that this filter applies only to a subset of the given columns. |
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColumnValueFilter(byte[] columnName, ColumnValueFilter.CompareOp compareOp, byte[] value)
columnName
- name of columncompareOp
- operatorvalue
- value to compare column values againstpublic ColumnValueFilter(byte[] columnName, ColumnValueFilter.CompareOp compareOp, WritableByteArrayComparable comparator)
columnName
- name of columncompareOp
- operatorcomparator
- Comparator to use.Method Detail |
---|
public boolean filterRowKey(byte[] rowKey)
filterRowKey
in interface RowFilterInterface
public boolean filterColumn(byte[] rowKey, byte[] colKey, byte[] data)
filterColumn
in interface RowFilterInterface
rowKey
- row key to filter on.colKey
- column name to filter ondata
- column value to filter on
public boolean filterAllRemaining()
filterAllRemaining
in interface RowFilterInterface
public boolean filterRow(SortedMap<byte[],Cell> columns)
filterRow
in interface RowFilterInterface
public boolean processAlways()
processAlways
in interface RowFilterInterface
public void reset()
reset
in interface RowFilterInterface
public void rowProcessed(boolean filtered, byte[] key)
rowProcessed
in interface RowFilterInterface
RowFilterSet
public void validate(byte[][] columns)
validate
in interface RowFilterInterface
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |