|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.hbase.filter.FilterBase org.apache.hadoop.hbase.hbql.filter.InstrumentedFilter org.apache.hadoop.hbase.hbql.filter.SingleColumnValueFilter
public class SingleColumnValueFilter
This filter is used to filter cells based on value. It takes a
CompareFilter.CompareOp
operator (equal, greater, not equal, etc), and either a byte [] value or
a WritableByteArrayComparable
.
setFilterIfMissing(boolean)
.
Otherwise, if the column is found, the entire row will be emitted only if
the value passes. If the value fails, the row will be filtered out.
In order to test values of previous versions (timestamps), set
setLatestVersionOnly(boolean)
to false. The default is true, meaning that
only the latest version's value is tested and all previous versions are ignored.
To filter based on the value of all scanned columns, use ValueFilter
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.filter.Filter |
---|
org.apache.hadoop.hbase.filter.Filter.ReturnCode |
Constructor Summary | |
---|---|
SingleColumnValueFilter()
Writable constructor, do not use. |
|
SingleColumnValueFilter(byte[] family,
byte[] qualifier,
org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp,
byte[] value)
Constructor for binary compare of the value of a single column. |
|
SingleColumnValueFilter(byte[] family,
byte[] qualifier,
org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp,
org.apache.hadoop.hbase.filter.WritableByteArrayComparable comparator)
Constructor for binary compare of the value of a single column. |
Method Summary | |
---|---|
boolean |
filterAllRemaining()
|
org.apache.hadoop.hbase.filter.Filter.ReturnCode |
filterKeyValue(org.apache.hadoop.hbase.KeyValue keyValue)
|
boolean |
filterRow()
|
boolean |
filterRowKey(byte[] rowKey,
int offset,
int length)
|
boolean |
getFilterIfMissing()
Get whether entire row should be filtered if column is not found. |
boolean |
getLatestVersionOnly()
Get whether only the latest version of the column value should be compared. |
boolean |
getVerbose()
|
void |
readFields(DataInput in)
|
void |
reset()
|
void |
setFilterIfMissing(boolean filterIfMissing)
Set whether entire row should be filtered if column is not found. |
void |
setLatestVersionOnly(boolean latestVersionOnly)
Set whether only the latest version of the column value should be compared. |
void |
setVerbose(boolean verbose)
|
void |
write(DataOutput out)
|
Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase |
---|
filterRow, getNextKeyHint, hasFilterRow |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleColumnValueFilter()
public SingleColumnValueFilter(byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, byte[] value)
family
- name of column familyqualifier
- name of column qualifiercompareOp
- operatorvalue
- value to compare column values againstpublic SingleColumnValueFilter(byte[] family, byte[] qualifier, org.apache.hadoop.hbase.filter.CompareFilter.CompareOp compareOp, org.apache.hadoop.hbase.filter.WritableByteArrayComparable comparator)
family
- name of column familyqualifier
- name of column qualifiercompareOp
- operatorcomparator
- Comparator to use.Method Detail |
---|
public void setVerbose(boolean verbose)
setVerbose
in class InstrumentedFilter
public boolean getVerbose()
getVerbose
in class InstrumentedFilter
public boolean filterRowKey(byte[] rowKey, int offset, int length)
filterRowKey
in interface org.apache.hadoop.hbase.filter.Filter
filterRowKey
in class org.apache.hadoop.hbase.filter.FilterBase
public org.apache.hadoop.hbase.filter.Filter.ReturnCode filterKeyValue(org.apache.hadoop.hbase.KeyValue keyValue)
filterKeyValue
in interface org.apache.hadoop.hbase.filter.Filter
filterKeyValue
in class org.apache.hadoop.hbase.filter.FilterBase
public boolean filterAllRemaining()
filterAllRemaining
in interface org.apache.hadoop.hbase.filter.Filter
filterAllRemaining
in class org.apache.hadoop.hbase.filter.FilterBase
public boolean filterRow()
filterRow
in interface org.apache.hadoop.hbase.filter.Filter
filterRow
in class org.apache.hadoop.hbase.filter.FilterBase
public void reset()
reset
in interface org.apache.hadoop.hbase.filter.Filter
reset
in class org.apache.hadoop.hbase.filter.FilterBase
public boolean getFilterIfMissing()
public void setFilterIfMissing(boolean filterIfMissing)
public boolean getLatestVersionOnly()
public void setLatestVersionOnly(boolean latestVersionOnly)
public void readFields(DataInput in) throws IOException
IOException
public void write(DataOutput out) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |