@Internal public final class Tuple2CaseClassSerializerSnapshot<T1,T2> extends CompositeTypeSerializerSnapshot<scala.Tuple2<T1,T2>,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>>>
TypeSerializerSnapshot
for ScalaCaseClassSerializer
.Constructor and Description |
---|
Tuple2CaseClassSerializerSnapshot() |
Tuple2CaseClassSerializerSnapshot(Class<scala.Tuple2<T1,T2>> tupleClass)
Constructor for backwards compatibility path, used by the method
Tuple2CaseClassSerializer#resolveSchemaCompatibilityViaRedirectingToNewSnapshotClass(TypeSerializerConfigSnapshot) . |
Tuple2CaseClassSerializerSnapshot(org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>> serializerInstance) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>> |
createOuterSerializerWithNestedSerializers(TypeSerializer<?>[] nestedSerializers)
Creates an instance of the outer serializer with a given array of its nested serializers.
|
protected int |
getCurrentOuterSnapshotVersion()
Returns the version of the current outer snapshot's written binary format.
|
protected TypeSerializer<?>[] |
getNestedSerializers(org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>> outerSerializer)
Gets the nested serializers from the outer serializer.
|
protected boolean |
isOuterSnapshotCompatible(org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>> newSerializer)
Checks whether the outer snapshot is compatible with a given new serializer.
|
protected void |
readOuterSnapshot(int readOuterSnapshotVersion,
DataInputView in,
ClassLoader userCodeClassLoader)
Reads the outer snapshot, i.e.
|
protected void |
writeOuterSnapshot(DataOutputView out)
Writes the outer snapshot, i.e.
|
getCurrentVersion, readSnapshot, resolveSchemaCompatibility, restoreSerializer, writeSnapshot
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
readVersionedSnapshot, writeVersionedSnapshot
public Tuple2CaseClassSerializerSnapshot()
public Tuple2CaseClassSerializerSnapshot(org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>> serializerInstance)
protected int getCurrentOuterSnapshotVersion()
CompositeTypeSerializerSnapshot
getCurrentOuterSnapshotVersion
in class CompositeTypeSerializerSnapshot<scala.Tuple2<T1,T2>,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>>>
protected TypeSerializer<?>[] getNestedSerializers(org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>> outerSerializer)
CompositeTypeSerializerSnapshot
getNestedSerializers
in class CompositeTypeSerializerSnapshot<scala.Tuple2<T1,T2>,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>>>
outerSerializer
- the outer serializer.protected org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>> createOuterSerializerWithNestedSerializers(TypeSerializer<?>[] nestedSerializers)
CompositeTypeSerializerSnapshot
createOuterSerializerWithNestedSerializers
in class CompositeTypeSerializerSnapshot<scala.Tuple2<T1,T2>,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>>>
nestedSerializers
- array of nested serializers to create the outer serializer with.protected void writeOuterSnapshot(DataOutputView out) throws IOException
CompositeTypeSerializerSnapshot
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.isOuterSnapshotCompatible(TypeSerializer)
needs to be implemented.
writeOuterSnapshot
in class CompositeTypeSerializerSnapshot<scala.Tuple2<T1,T2>,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>>>
out
- the DataOutputView
to write the outer snapshot to.IOException
protected void readOuterSnapshot(int readOuterSnapshotVersion, DataInputView in, ClassLoader userCodeClassLoader) throws IOException
CompositeTypeSerializerSnapshot
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.isOuterSnapshotCompatible(TypeSerializer)
needs to be implemented.
readOuterSnapshot
in class CompositeTypeSerializerSnapshot<scala.Tuple2<T1,T2>,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>>>
readOuterSnapshotVersion
- the read version of the outer snapshot.in
- the DataInputView
to read the outer snapshot from.userCodeClassLoader
- the user code class loader.IOException
protected boolean isOuterSnapshotCompatible(org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>> newSerializer)
CompositeTypeSerializerSnapshot
The base implementation of this method just returns true
, i.e. it assumes that the outer serializer
only has nested serializers and no extra information, and therefore the result of the check must always
be true. 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.readOuterSnapshot(int, DataInputView, ClassLoader)
needs to be implemented.
isOuterSnapshotCompatible
in class CompositeTypeSerializerSnapshot<scala.Tuple2<T1,T2>,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<scala.Tuple2<T1,T2>>>
newSerializer
- the new serializer, which contains the new outer information to check against.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.