@Internal public final class ScalaCaseClassSerializerSnapshot<T extends scala.Product> extends CompositeTypeSerializerSnapshot<T,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T>>
TypeSerializerSnapshot
for ScalaCaseClassSerializer
.CompositeTypeSerializerSnapshot.OuterSchemaCompatibility
Constructor and Description |
---|
ScalaCaseClassSerializerSnapshot()
Used via reflection.
|
ScalaCaseClassSerializerSnapshot(org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T> serializerInstance)
Used for the snapshot path.
|
Modifier and Type | Method and Description |
---|---|
protected org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T> |
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<T> outerSerializer)
Gets the nested serializers from the outer serializer.
|
protected void |
readOuterSnapshot(int readOuterSnapshotVersion,
DataInputView in,
ClassLoader userCodeClassLoader)
Reads the outer snapshot, i.e.
|
protected CompositeTypeSerializerSnapshot.OuterSchemaCompatibility |
resolveOuterSchemaCompatibility(org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T> newSerializer)
Checks the schema compatibility of the given new serializer based on the outer snapshot.
|
protected void |
writeOuterSnapshot(DataOutputView out)
Writes the outer snapshot, i.e.
|
getCurrentVersion, getNestedSerializerSnapshots, isOuterSnapshotCompatible, readSnapshot, resolveSchemaCompatibility, restoreSerializer, writeSnapshot
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
readVersionedSnapshot, writeVersionedSnapshot
public ScalaCaseClassSerializerSnapshot()
public ScalaCaseClassSerializerSnapshot(org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T> serializerInstance)
protected int getCurrentOuterSnapshotVersion()
CompositeTypeSerializerSnapshot
getCurrentOuterSnapshotVersion
in class CompositeTypeSerializerSnapshot<T extends scala.Product,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T extends scala.Product>>
protected TypeSerializer<?>[] getNestedSerializers(org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T> outerSerializer)
CompositeTypeSerializerSnapshot
getNestedSerializers
in class CompositeTypeSerializerSnapshot<T extends scala.Product,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T extends scala.Product>>
outerSerializer
- the outer serializer.protected org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T> createOuterSerializerWithNestedSerializers(TypeSerializer<?>[] nestedSerializers)
CompositeTypeSerializerSnapshot
createOuterSerializerWithNestedSerializers
in class CompositeTypeSerializerSnapshot<T extends scala.Product,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T extends scala.Product>>
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.resolveOuterSchemaCompatibility(TypeSerializer)
needs to be implemented.
writeOuterSnapshot
in class CompositeTypeSerializerSnapshot<T extends scala.Product,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T extends scala.Product>>
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.resolveOuterSchemaCompatibility(TypeSerializer)
needs to be implemented.
readOuterSnapshot
in class CompositeTypeSerializerSnapshot<T extends scala.Product,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T extends scala.Product>>
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 CompositeTypeSerializerSnapshot.OuterSchemaCompatibility resolveOuterSchemaCompatibility(org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T> newSerializer)
CompositeTypeSerializerSnapshot
The base implementation of this method assumes that the outer serializer only has nested
serializers and no extra information, and therefore the result of the check is CompositeTypeSerializerSnapshot.OuterSchemaCompatibility.COMPATIBLE_AS_IS
. 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.
resolveOuterSchemaCompatibility
in class CompositeTypeSerializerSnapshot<T extends scala.Product,org.apache.flink.api.scala.typeutils.ScalaCaseClassSerializer<T extends scala.Product>>
newSerializer
- the new serializer, which contains the new outer information to check
against.CompositeTypeSerializerSnapshot.OuterSchemaCompatibility
indicating whether or the new serializer's outer
information is compatible, requires migration, or incompatible with the one written in
this snapshot.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.