public abstract class TupleComparatorBase<T> extends CompositeTypeComparator<T> implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected TypeComparator[] |
comparators
comparators for the key fields, in the same order as the key fields
|
protected Object[] |
deserializedFields1 |
protected Object[] |
deserializedFields2 |
static int[] |
HASH_SALT
A sequence of prime numbers to be used for salting the computed hash values.
|
protected boolean |
invertNormKey |
protected int[] |
keyPositions
key positions describe which fields are keys in what order
|
protected int |
normalizableKeyPrefixLen |
protected int[] |
normalizedKeyLengths |
protected int |
numLeadingNormalizableKeys |
protected TypeSerializer[] |
serializers
serializers to deserialize the first n fields for comparison
|
| Modifier | Constructor and Description |
|---|---|
|
TupleComparatorBase(int[] keyPositions,
TypeComparator<?>[] comparators,
TypeSerializer<?>[] serializers) |
protected |
TupleComparatorBase(TupleComparatorBase<T> toClone) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareSerialized(DataInputView firstSource,
DataInputView secondSource) |
int |
compareToReference(TypeComparator<T> referencedComparator) |
void |
getFlatComparator(List<TypeComparator> flatComparators) |
protected int[] |
getKeyPositions() |
int |
getNormalizeKeyLen() |
protected void |
instantiateDeserializationUtils() |
boolean |
invertNormalizedKey() |
boolean |
isNormalizedKeyPrefixOnly(int keyBytes) |
protected void |
privateDuplicate(TupleComparatorBase<T> toClone) |
T |
readWithKeyDenormalization(T reuse,
DataInputView source) |
boolean |
supportsNormalizedKey() |
boolean |
supportsSerializationWithKeyNormalization() |
void |
writeWithKeyNormalization(T record,
DataOutputView target) |
getFlatComparatorscompare, compareAgainstReference, duplicate, equalToReference, extractKeys, hash, putNormalizedKey, setReference, supportsCompareAgainstReferenceprotected int[] keyPositions
protected TypeComparator[] comparators
protected int[] normalizedKeyLengths
protected int numLeadingNormalizableKeys
protected int normalizableKeyPrefixLen
protected boolean invertNormKey
protected TypeSerializer[] serializers
protected transient Object[] deserializedFields1
protected transient Object[] deserializedFields2
public static final int[] HASH_SALT
public TupleComparatorBase(int[] keyPositions,
TypeComparator<?>[] comparators,
TypeSerializer<?>[] serializers)
protected TupleComparatorBase(TupleComparatorBase<T> toClone)
protected void privateDuplicate(TupleComparatorBase<T> toClone)
protected int[] getKeyPositions()
public void getFlatComparator(List<TypeComparator> flatComparators)
getFlatComparator in class CompositeTypeComparator<T>public int compareToReference(TypeComparator<T> referencedComparator)
compareToReference in class TypeComparator<T>public int compareSerialized(DataInputView firstSource, DataInputView secondSource) throws IOException
compareSerialized in class TypeComparator<T>IOExceptionpublic boolean supportsNormalizedKey()
supportsNormalizedKey in class TypeComparator<T>public int getNormalizeKeyLen()
getNormalizeKeyLen in class TypeComparator<T>public boolean isNormalizedKeyPrefixOnly(int keyBytes)
isNormalizedKeyPrefixOnly in class TypeComparator<T>public boolean invertNormalizedKey()
invertNormalizedKey in class TypeComparator<T>public boolean supportsSerializationWithKeyNormalization()
supportsSerializationWithKeyNormalization in class TypeComparator<T>public void writeWithKeyNormalization(T record, DataOutputView target) throws IOException
writeWithKeyNormalization in class TypeComparator<T>IOExceptionpublic T readWithKeyDenormalization(T reuse, DataInputView source) throws IOException
readWithKeyDenormalization in class TypeComparator<T>IOExceptionprotected final void instantiateDeserializationUtils()
Copyright © 2015 The Apache Software Foundation. All rights reserved.