public class IndexRowKeyEncoder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Null |
NULL_VALUE
Public reusable instance of Null.
|
static java.util.Comparator<org.ojai.Value> |
VALUE_COMPARATOR |
Constructor and Description |
---|
IndexRowKeyEncoder() |
Modifier and Type | Method and Description |
---|---|
static java.nio.ByteBuffer |
encodeComponent(KeyValue value,
int version,
boolean descendingOrder,
boolean missingAndNullFirst) |
static RowkeyRange |
getErrRowKeyRange(boolean hashIndex) |
int |
getEstimatedEncodingSize() |
static java.util.List<RowkeyRange> |
getHashedRowKeyRanges(java.util.List<RowkeyRange> lrr,
int numPartitions) |
int |
getRowKey(byte[] buf) |
java.util.List<RowkeyRange> |
getRowKeyRange(com.mapr.fs.proto.Dbfilters.CompareOpProto op,
KeyValue value,
int indexedFieldIdx) |
java.util.List<RowkeyRange> |
getRowKeyRangeForPrefixMatch(byte[] value,
int indexedFieldIdx) |
int |
getVersion() |
void |
init(int version,
boolean[] descendingOrder) |
void |
init(int version,
boolean[] descendingOrder,
boolean missingAndNullFirst) |
void |
init(int version,
boolean[] descendingOrder,
boolean missingAndNullFirst,
boolean isHashedIndex,
int numHashPartitions) |
static int |
memcmp(byte[] b1,
byte[] b2) |
void |
resetComponents() |
void |
resetComponents(boolean preservePrimaryKeySetting) |
IndexRowKeyEncoder |
setComponent(int idx) |
IndexRowKeyEncoder |
setComponent(int idx,
boolean componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
byte componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
byte[] componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
byte[] componentValue,
int componentValueSize) |
IndexRowKeyEncoder |
setComponent(int idx,
double componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
float componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
int componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
long componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
Null componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
OArray componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
org.ojai.types.ODate componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
OMap componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
org.ojai.types.OTime componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
org.ojai.types.OTimestamp componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
short componentValue) |
IndexRowKeyEncoder |
setComponent(int idx,
org.ojai.Value componentValue)
Generic component setter, just a switch on the value type to call the
appropriate overload.
|
IndexRowKeyEncoder |
setError(Error e) |
IndexRowKeyEncoder |
setPrimaryKey(byte[] primaryKey)
Sets the primary table's row-key for the index row
|
IndexRowKeyEncoder |
setPrimaryKey(java.lang.String primaryKey)
Sets the primary table's row-key for the index row
|
public static final java.util.Comparator<org.ojai.Value> VALUE_COMPARATOR
public static final Null NULL_VALUE
public void init(int version, boolean[] descendingOrder, boolean missingAndNullFirst, boolean isHashedIndex, int numHashPartitions)
public void init(int version, boolean[] descendingOrder, boolean missingAndNullFirst)
public void init(int version, boolean[] descendingOrder)
public int getVersion()
public void resetComponents()
public void resetComponents(boolean preservePrimaryKeySetting)
public IndexRowKeyEncoder setComponent(int idx, org.ojai.Value componentValue)
idx
- component indexcomponentValue
- the valuepublic IndexRowKeyEncoder setComponent(int idx, Null componentValue)
public IndexRowKeyEncoder setComponent(int idx, boolean componentValue)
public IndexRowKeyEncoder setComponent(int idx, byte[] componentValue, int componentValueSize)
public IndexRowKeyEncoder setComponent(int idx)
public IndexRowKeyEncoder setComponent(int idx, byte componentValue)
public IndexRowKeyEncoder setComponent(int idx, short componentValue)
public IndexRowKeyEncoder setComponent(int idx, int componentValue)
public IndexRowKeyEncoder setComponent(int idx, long componentValue)
public IndexRowKeyEncoder setComponent(int idx, float componentValue)
public IndexRowKeyEncoder setComponent(int idx, double componentValue)
public IndexRowKeyEncoder setComponent(int idx, byte[] componentValue)
public IndexRowKeyEncoder setComponent(int idx, org.ojai.types.OTime componentValue)
public IndexRowKeyEncoder setComponent(int idx, org.ojai.types.OTimestamp componentValue)
public IndexRowKeyEncoder setComponent(int idx, org.ojai.types.ODate componentValue)
public IndexRowKeyEncoder setComponent(int idx, OArray componentValue)
public IndexRowKeyEncoder setComponent(int idx, OMap componentValue)
public IndexRowKeyEncoder setError(Error e)
public int getEstimatedEncodingSize()
public IndexRowKeyEncoder setPrimaryKey(byte[] primaryKey)
rowKey
- Primary table's row-keypublic IndexRowKeyEncoder setPrimaryKey(java.lang.String primaryKey)
rowKey
- Primary table's row-keypublic int getRowKey(byte[] buf) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public static java.nio.ByteBuffer encodeComponent(KeyValue value, int version, boolean descendingOrder, boolean missingAndNullFirst)
public static int memcmp(byte[] b1, byte[] b2)
public java.util.List<RowkeyRange> getRowKeyRange(com.mapr.fs.proto.Dbfilters.CompareOpProto op, KeyValue value, int indexedFieldIdx)
public java.util.List<RowkeyRange> getRowKeyRangeForPrefixMatch(byte[] value, int indexedFieldIdx)
public static RowkeyRange getErrRowKeyRange(boolean hashIndex)
public static java.util.List<RowkeyRange> getHashedRowKeyRanges(java.util.List<RowkeyRange> lrr, int numPartitions)