Class TupleSerializerSnapshot<T extends org.apache.flink.api.java.tuple.Tuple>
- java.lang.Object
-
- org.apache.flink.api.common.typeutils.CompositeTypeSerializerSnapshot<T,TupleSerializer<T>>
-
- org.apache.flink.api.java.typeutils.runtime.TupleSerializerSnapshot<T>
-
- All Implemented Interfaces:
TypeSerializerSnapshot<T>
@Internal public final class TupleSerializerSnapshot<T extends org.apache.flink.api.java.tuple.Tuple> extends CompositeTypeSerializerSnapshot<T,TupleSerializer<T>>
Snapshot of a tuple serializer's configuration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.api.common.typeutils.CompositeTypeSerializerSnapshot
CompositeTypeSerializerSnapshot.OuterSchemaCompatibility
-
-
Constructor Summary
Constructors Constructor Description TupleSerializerSnapshot()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TupleSerializer<T>createOuterSerializerWithNestedSerializers(TypeSerializer<?>[] nestedSerializers)Creates an instance of the outer serializer with a given array of its nested serializers.protected intgetCurrentOuterSnapshotVersion()Returns the version of the current outer snapshot's written binary format.protected TypeSerializer<?>[]getNestedSerializers(TupleSerializer<T> outerSerializer)Gets the nested serializers from the outer serializer.protected voidreadOuterSnapshot(int readOuterSnapshotVersion, DataInputView in, ClassLoader userCodeClassLoader)Reads the outer snapshot, i.e. any information beyond the nested serializers of the outer serializer.protected voidwriteOuterSnapshot(DataOutputView out)Writes the outer snapshot, i.e. any information beyond the nested serializers of the outer serializer.-
Methods inherited from class org.apache.flink.api.common.typeutils.CompositeTypeSerializerSnapshot
getCurrentVersion, getNestedSerializerSnapshots, isOuterSnapshotCompatible, readSnapshot, resolveOuterSchemaCompatibility, resolveOuterSchemaCompatibility, resolveSchemaCompatibility, restoreSerializer, writeSnapshot
-
-
-
-
Method Detail
-
getCurrentOuterSnapshotVersion
protected int getCurrentOuterSnapshotVersion()
Description copied from class:CompositeTypeSerializerSnapshotReturns the version of the current outer snapshot's written binary format.- Specified by:
getCurrentOuterSnapshotVersionin classCompositeTypeSerializerSnapshot<T extends org.apache.flink.api.java.tuple.Tuple,TupleSerializer<T extends org.apache.flink.api.java.tuple.Tuple>>- Returns:
- the version of the current outer snapshot's written binary format.
-
getNestedSerializers
protected TypeSerializer<?>[] getNestedSerializers(TupleSerializer<T> outerSerializer)
Description copied from class:CompositeTypeSerializerSnapshotGets the nested serializers from the outer serializer.- Specified by:
getNestedSerializersin classCompositeTypeSerializerSnapshot<T extends org.apache.flink.api.java.tuple.Tuple,TupleSerializer<T extends org.apache.flink.api.java.tuple.Tuple>>- Parameters:
outerSerializer- the outer serializer.- Returns:
- the nested serializers.
-
createOuterSerializerWithNestedSerializers
protected TupleSerializer<T> createOuterSerializerWithNestedSerializers(TypeSerializer<?>[] nestedSerializers)
Description copied from class:CompositeTypeSerializerSnapshotCreates an instance of the outer serializer with a given array of its nested serializers.- Specified by:
createOuterSerializerWithNestedSerializersin classCompositeTypeSerializerSnapshot<T extends org.apache.flink.api.java.tuple.Tuple,TupleSerializer<T extends org.apache.flink.api.java.tuple.Tuple>>- Parameters:
nestedSerializers- array of nested serializers to create the outer serializer with.- Returns:
- an instance of the outer serializer.
-
writeOuterSnapshot
protected void writeOuterSnapshot(DataOutputView out) throws IOException
Description copied from class:CompositeTypeSerializerSnapshotWrites the outer snapshot, i.e. any information beyond the nested serializers of the outer serializer.The base implementation of this methods writes nothing, i.e. it assumes that the outer serializer only has nested serializers and no extra information. Otherwise, if the outer serializer contains some extra information that needs to be persisted as part of the serializer snapshot, this must be overridden. Note that this method and the corresponding methods
CompositeTypeSerializerSnapshot.readOuterSnapshot(int, DataInputView, ClassLoader),CompositeTypeSerializerSnapshot.resolveOuterSchemaCompatibility(TypeSerializerSnapshot)needs to be implemented.- Overrides:
writeOuterSnapshotin classCompositeTypeSerializerSnapshot<T extends org.apache.flink.api.java.tuple.Tuple,TupleSerializer<T extends org.apache.flink.api.java.tuple.Tuple>>- Parameters:
out- theDataOutputViewto write the outer snapshot to.- Throws:
IOException
-
readOuterSnapshot
protected void readOuterSnapshot(int readOuterSnapshotVersion, DataInputView in, ClassLoader userCodeClassLoader) throws IOExceptionDescription copied from class:CompositeTypeSerializerSnapshotReads the outer snapshot, i.e. any information beyond the nested serializers of the outer serializer.The base implementation of this methods reads nothing, i.e. it assumes that the outer serializer only has nested serializers and no extra information. Otherwise, if the outer serializer contains some extra information that has been persisted as part of the serializer snapshot, this must be overridden. Note that this method and the corresponding methods
CompositeTypeSerializerSnapshot.writeOuterSnapshot(DataOutputView),CompositeTypeSerializerSnapshot.resolveOuterSchemaCompatibility(TypeSerializerSnapshot)needs to be implemented.- Overrides:
readOuterSnapshotin classCompositeTypeSerializerSnapshot<T extends org.apache.flink.api.java.tuple.Tuple,TupleSerializer<T extends org.apache.flink.api.java.tuple.Tuple>>- Parameters:
readOuterSnapshotVersion- the read version of the outer snapshot.in- theDataInputViewto read the outer snapshot from.userCodeClassLoader- the user code class loader.- Throws:
IOException
-
-