public class JavaEitherSerializerSnapshot<L,R> extends CompositeTypeSerializerSnapshot<Either<L,R>,EitherSerializer<L,R>>
EitherSerializer
.CompositeTypeSerializerSnapshot.OuterSchemaCompatibility
Constructor and Description |
---|
JavaEitherSerializerSnapshot()
Constructor for read instantiation.
|
JavaEitherSerializerSnapshot(EitherSerializer<L,R> eitherSerializer)
Constructor to create the snapshot for writing.
|
Modifier and Type | Method and Description |
---|---|
protected EitherSerializer<L,R> |
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(EitherSerializer<L,R> outerSerializer)
Gets the nested serializers from the outer serializer.
|
TypeSerializerSchemaCompatibility<Either<L,R>> |
resolveSchemaCompatibility(TypeSerializerSnapshot<Either<L,R>> oldSerializerSnapshot)
Checks current serializer's compatibility to read data written by the prior serializer.
|
getCurrentVersion, getNestedSerializerSnapshots, isOuterSnapshotCompatible, readOuterSnapshot, readSnapshot, resolveOuterSchemaCompatibility, resolveOuterSchemaCompatibility, restoreSerializer, writeOuterSnapshot, writeSnapshot
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
readVersionedSnapshot, resolveSchemaCompatibility, writeVersionedSnapshot
public JavaEitherSerializerSnapshot()
public JavaEitherSerializerSnapshot(EitherSerializer<L,R> eitherSerializer)
protected int getCurrentOuterSnapshotVersion()
CompositeTypeSerializerSnapshot
getCurrentOuterSnapshotVersion
in class CompositeTypeSerializerSnapshot<Either<L,R>,EitherSerializer<L,R>>
public TypeSerializerSchemaCompatibility<Either<L,R>> resolveSchemaCompatibility(TypeSerializerSnapshot<Either<L,R>> oldSerializerSnapshot)
TypeSerializerSnapshot
When a checkpoint/savepoint is restored, this method checks whether the serialization format of the data in the checkpoint/savepoint is compatible for the format of the serializer used by the program that restores the checkpoint/savepoint. The outcome can be that the serialization format is compatible, that the program's serializer needs to reconfigure itself (meaning to incorporate some information from the TypeSerializerSnapshot to be compatible), that the format is outright incompatible, or that a migration needed. In the latter case, the TypeSerializerSnapshot produces a serializer to deserialize the data, and the restoring program's serializer re-serializes the data, thus converting the format during the restore operation.
This method must be implemented to clarify the compatibility. See FLIP-263 for more details.
resolveSchemaCompatibility
in interface TypeSerializerSnapshot<Either<L,R>>
resolveSchemaCompatibility
in class CompositeTypeSerializerSnapshot<Either<L,R>,EitherSerializer<L,R>>
oldSerializerSnapshot
- the old serializer snapshot to check.protected EitherSerializer<L,R> createOuterSerializerWithNestedSerializers(TypeSerializer<?>[] nestedSerializers)
CompositeTypeSerializerSnapshot
createOuterSerializerWithNestedSerializers
in class CompositeTypeSerializerSnapshot<Either<L,R>,EitherSerializer<L,R>>
nestedSerializers
- array of nested serializers to create the outer serializer with.protected TypeSerializer<?>[] getNestedSerializers(EitherSerializer<L,R> outerSerializer)
CompositeTypeSerializerSnapshot
getNestedSerializers
in class CompositeTypeSerializerSnapshot<Either<L,R>,EitherSerializer<L,R>>
outerSerializer
- the outer serializer.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.