A
- first tuple valueB
- second tuple valueC
- third tuple valuepublic static class BTreeKeySerializer.Tuple3KeySerializer<A,B,C> extends BTreeKeySerializer<Fun.Tuple3<A,B,C>> implements Serializable
Value Serialized as ---------------------------- Tuple(1, 2, 1) 1, 2, 1 Tuple(1, 2, 2) 2 Tuple(1, 3, 3) 3, 3 Tuple(1, 3, 4) 4
BTreeKeySerializer.BasicKeySerializer, BTreeKeySerializer.Tuple2KeySerializer<A,B>, BTreeKeySerializer.Tuple3KeySerializer<A,B,C>, BTreeKeySerializer.Tuple4KeySerializer<A,B,C,D>, BTreeKeySerializer.Tuple5KeySerializer<A,B,C,D,E>, BTreeKeySerializer.Tuple6KeySerializer<A,B,C,D,E,F>
Modifier and Type | Field and Description |
---|---|
protected Comparator<A> |
aComparator |
protected Serializer<A> |
aSerializer |
protected Comparator<B> |
bComparator |
protected Serializer<B> |
bSerializer |
protected Serializer<C> |
cSerializer |
BASIC, STRING, TUPLE2, TUPLE3, TUPLE4, ZERO_OR_POSITIVE_INT, ZERO_OR_POSITIVE_LONG
Constructor and Description |
---|
Tuple3KeySerializer(Comparator<A> aComparator,
Comparator<B> bComparator,
Serializer<A> aSerializer,
Serializer<B> bSerializer,
Serializer<C> cSerializer)
Construct new Tuple3 Key Serializer.
|
Modifier and Type | Method and Description |
---|---|
Object[] |
deserialize(DataInput in,
int start,
int end,
int size)
Deserializes keys for single BTree Node.
|
boolean |
equals(Object o) |
Comparator<Fun.Tuple3<A,B,C>> |
getComparator()
Some key serializers may only work with they own comparators.
|
int |
hashCode() |
void |
serialize(DataOutput out,
int start,
int end,
Object[] keys)
Serialize keys from single BTree Node.
|
leadingValuePackRead, leadingValuePackWrite
protected final Comparator<A> aComparator
protected final Comparator<B> bComparator
protected final Serializer<A> aSerializer
protected final Serializer<B> bSerializer
protected final Serializer<C> cSerializer
public Tuple3KeySerializer(Comparator<A> aComparator, Comparator<B> bComparator, Serializer<A> aSerializer, Serializer<B> bSerializer, Serializer<C> cSerializer)
aComparator
- comparator used for first tuple valuebComparator
- comparator used for second tuple valueaSerializer
- serializer used for first tuple valuebSerializer
- serializer used for second tuple valuecSerializer
- serializer used for third tuple valuepublic void serialize(DataOutput out, int start, int end, Object[] keys) throws IOException
BTreeKeySerializer
serialize
in class BTreeKeySerializer<Fun.Tuple3<A,B,C>>
out
- output stream where to put atastart
- where data start in array. Before this index all keys are nullend
- where data ends in array (exclusive). From this index all keys are nullkeys
- array of keys for single BTree NodeIOException
public Object[] deserialize(DataInput in, int start, int end, int size) throws IOException
BTreeKeySerializer
deserialize
in class BTreeKeySerializer<Fun.Tuple3<A,B,C>>
in
- input stream to read data fromstart
- where data start in array. Before this index all keys are nullend
- where data ends in array (exclusive). From this index all keys are nullsize
- size of array which should be returnedIOException
public Comparator<Fun.Tuple3<A,B,C>> getComparator()
BTreeKeySerializer
getComparator
in class BTreeKeySerializer<Fun.Tuple3<A,B,C>>
Copyright © 2015. All rights reserved.