Class JavaEitherSerializerSnapshot<L,R>
- java.lang.Object
-
- org.apache.flink.api.common.typeutils.CompositeTypeSerializerSnapshot<Either<L,R>,EitherSerializer<L,R>>
-
- org.apache.flink.api.java.typeutils.runtime.JavaEitherSerializerSnapshot<L,R>
-
- All Implemented Interfaces:
TypeSerializerSnapshot<Either<L,R>>
public class JavaEitherSerializerSnapshot<L,R> extends CompositeTypeSerializerSnapshot<Either<L,R>,EitherSerializer<L,R>>
Snapshot class for theEitherSerializer.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.api.common.typeutils.CompositeTypeSerializerSnapshot
CompositeTypeSerializerSnapshot.OuterSchemaCompatibility
-
-
Constructor Summary
Constructors Constructor Description JavaEitherSerializerSnapshot()Constructor for read instantiation.JavaEitherSerializerSnapshot(EitherSerializer<L,R> eitherSerializer)Constructor to create the snapshot for writing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EitherSerializer<L,R>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(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.-
Methods inherited from class org.apache.flink.api.common.typeutils.CompositeTypeSerializerSnapshot
getCurrentVersion, getNestedSerializerSnapshots, isOuterSnapshotCompatible, readOuterSnapshot, readSnapshot, resolveOuterSchemaCompatibility, resolveOuterSchemaCompatibility, restoreSerializer, writeOuterSnapshot, writeSnapshot
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.api.common.typeutils.TypeSerializerSnapshot
resolveSchemaCompatibility
-
-
-
-
Constructor Detail
-
JavaEitherSerializerSnapshot
public JavaEitherSerializerSnapshot()
Constructor for read instantiation.
-
JavaEitherSerializerSnapshot
public JavaEitherSerializerSnapshot(EitherSerializer<L,R> eitherSerializer)
Constructor to create the snapshot for writing.
-
-
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<Either<L,R>,EitherSerializer<L,R>>- Returns:
- the version of the current outer snapshot's written binary format.
-
resolveSchemaCompatibility
public TypeSerializerSchemaCompatibility<Either<L,R>> resolveSchemaCompatibility(TypeSerializerSnapshot<Either<L,R>> oldSerializerSnapshot)
Description copied from interface:TypeSerializerSnapshotChecks current serializer's compatibility to read data written by the prior serializer.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.
- Specified by:
resolveSchemaCompatibilityin interfaceTypeSerializerSnapshot<L>- Overrides:
resolveSchemaCompatibilityin classCompositeTypeSerializerSnapshot<Either<L,R>,EitherSerializer<L,R>>- Parameters:
oldSerializerSnapshot- the old serializer snapshot to check.- Returns:
- the serializer compatibility result.
-
createOuterSerializerWithNestedSerializers
protected EitherSerializer<L,R> 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<Either<L,R>,EitherSerializer<L,R>>- Parameters:
nestedSerializers- array of nested serializers to create the outer serializer with.- Returns:
- an instance of the outer serializer.
-
getNestedSerializers
protected TypeSerializer<?>[] getNestedSerializers(EitherSerializer<L,R> outerSerializer)
Description copied from class:CompositeTypeSerializerSnapshotGets the nested serializers from the outer serializer.- Specified by:
getNestedSerializersin classCompositeTypeSerializerSnapshot<Either<L,R>,EitherSerializer<L,R>>- Parameters:
outerSerializer- the outer serializer.- Returns:
- the nested serializers.
-
-