|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.filter.ByteArrayComparable
org.apache.hadoop.hbase.filter.SubstringComparator
@InterfaceAudience.Public @InterfaceStability.Stable public class SubstringComparator
This comparator is for use with SingleColumnValueFilter, for filtering based on the value of a given column. Use it to test if a given substring appears in a cell value in the column. The comparison is case insensitive.
Only EQUAL or NOT_EQUAL tests are valid with this comparator.
For example:
SingleColumnValueFilter scvf =
new SingleColumnValueFilter("col", CompareOp.EQUAL,
new SubstringComparator("substr"));
| Constructor Summary | |
|---|---|
SubstringComparator(String substr)
Constructor |
|
| Method Summary | |
|---|---|
int |
compareTo(byte[] value,
int offset,
int length)
Special compareTo method for subclasses, to avoid copying byte[] unnecessarily. |
byte[] |
getValue()
|
static SubstringComparator |
parseFrom(byte[] pbBytes)
|
byte[] |
toByteArray()
|
| Methods inherited from class org.apache.hadoop.hbase.filter.ByteArrayComparable |
|---|
compareTo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SubstringComparator(String substr)
substr - the substring| Method Detail |
|---|
public byte[] getValue()
getValue in class ByteArrayComparable
public int compareTo(byte[] value,
int offset,
int length)
ByteArrayComparable
compareTo in class ByteArrayComparablevalue - byte[] to compareoffset - offset into valuelength - number of bytes to compare
public byte[] toByteArray()
toByteArray in class ByteArrayComparable
public static SubstringComparator parseFrom(byte[] pbBytes)
throws DeserializationException
pbBytes - A pb serialized SubstringComparator instance
SubstringComparator made from bytes
DeserializationExceptiontoByteArray()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||