@InterfaceAudience.Public
public class SubstringComparator
extends org.apache.hadoop.hbase.filter.ByteArrayComparable
Only EQUAL or NOT_EQUAL tests are valid with this comparator.
For example:
SingleColumnValueFilter scvf =
new SingleColumnValueFilter("col", CompareOp.EQUAL,
new SubstringComparator("substr"));
| Constructor and Description |
|---|
SubstringComparator(String substr)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(byte[] value,
int offset,
int length) |
byte[] |
getValue() |
static SubstringComparator |
parseFrom(byte[] pbBytes) |
byte[] |
toByteArray() |
public SubstringComparator(String substr)
substr - the substringpublic byte[] getValue()
getValue in class org.apache.hadoop.hbase.filter.ByteArrayComparablepublic int compareTo(byte[] value,
int offset,
int length)
compareTo in class org.apache.hadoop.hbase.filter.ByteArrayComparablepublic byte[] toByteArray()
toByteArray in class org.apache.hadoop.hbase.filter.ByteArrayComparablepublic static SubstringComparator parseFrom(byte[] pbBytes) throws org.apache.hadoop.hbase.exceptions.DeserializationException
pbBytes - A pb serialized SubstringComparator instanceSubstringComparator made from bytesorg.apache.hadoop.hbase.exceptions.DeserializationExceptiontoByteArray()Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.