public abstract class TupleComparatorBase<T> extends org.apache.flink.api.common.typeutils.CompositeTypeComparator<T> implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.flink.api.common.typeutils.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 org.apache.flink.api.common.typeutils.TypeSerializer[] |
serializers
serializers to deserialize the first n fields for comparison
|
| Modifier | Constructor and Description |
|---|---|
|
TupleComparatorBase(int[] keyPositions,
org.apache.flink.api.common.typeutils.TypeComparator<?>[] comparators,
org.apache.flink.api.common.typeutils.TypeSerializer<?>[] serializers) |
protected |
TupleComparatorBase(TupleComparatorBase<T> toClone) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareSerialized(org.apache.flink.core.memory.DataInputView firstSource,
org.apache.flink.core.memory.DataInputView secondSource) |
int |
compareToReference(org.apache.flink.api.common.typeutils.TypeComparator<T> referencedComparator) |
void |
getFlatComparator(List<org.apache.flink.api.common.typeutils.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,
org.apache.flink.core.memory.DataInputView source) |
boolean |
supportsNormalizedKey() |
boolean |
supportsSerializationWithKeyNormalization() |
void |
writeWithKeyNormalization(T record,
org.apache.flink.core.memory.DataOutputView target) |
getFlatComparatorsprotected int[] keyPositions
protected org.apache.flink.api.common.typeutils.TypeComparator[] comparators
protected int[] normalizedKeyLengths
protected int numLeadingNormalizableKeys
protected int normalizableKeyPrefixLen
protected boolean invertNormKey
protected org.apache.flink.api.common.typeutils.TypeSerializer[] serializers
protected transient Object[] deserializedFields1
protected transient Object[] deserializedFields2
public static final int[] HASH_SALT
public TupleComparatorBase(int[] keyPositions,
org.apache.flink.api.common.typeutils.TypeComparator<?>[] comparators,
org.apache.flink.api.common.typeutils.TypeSerializer<?>[] serializers)
protected TupleComparatorBase(TupleComparatorBase<T> toClone)
protected void privateDuplicate(TupleComparatorBase<T> toClone)
protected int[] getKeyPositions()
public void getFlatComparator(List<org.apache.flink.api.common.typeutils.TypeComparator> flatComparators)
getFlatComparator in class org.apache.flink.api.common.typeutils.CompositeTypeComparator<T>public int compareToReference(org.apache.flink.api.common.typeutils.TypeComparator<T> referencedComparator)
compareToReference in class org.apache.flink.api.common.typeutils.TypeComparator<T>public int compareSerialized(org.apache.flink.core.memory.DataInputView firstSource,
org.apache.flink.core.memory.DataInputView secondSource)
throws IOException
compareSerialized in class org.apache.flink.api.common.typeutils.TypeComparator<T>IOExceptionpublic boolean supportsNormalizedKey()
supportsNormalizedKey in class org.apache.flink.api.common.typeutils.TypeComparator<T>public int getNormalizeKeyLen()
getNormalizeKeyLen in class org.apache.flink.api.common.typeutils.TypeComparator<T>public boolean isNormalizedKeyPrefixOnly(int keyBytes)
isNormalizedKeyPrefixOnly in class org.apache.flink.api.common.typeutils.TypeComparator<T>public boolean invertNormalizedKey()
invertNormalizedKey in class org.apache.flink.api.common.typeutils.TypeComparator<T>public boolean supportsSerializationWithKeyNormalization()
supportsSerializationWithKeyNormalization in class org.apache.flink.api.common.typeutils.TypeComparator<T>public void writeWithKeyNormalization(T record, org.apache.flink.core.memory.DataOutputView target) throws IOException
writeWithKeyNormalization in class org.apache.flink.api.common.typeutils.TypeComparator<T>IOExceptionpublic T readWithKeyDenormalization(T reuse, org.apache.flink.core.memory.DataInputView source) throws IOException
readWithKeyDenormalization in class org.apache.flink.api.common.typeutils.TypeComparator<T>IOExceptionprotected final void instantiateDeserializationUtils()
Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.