T
- the type of data serialized by the serializer that was being checked.@PublicEvolving public class TypeSerializerSchemaCompatibility<T> extends Object
TypeSerializerSchemaCompatibility
represents information about whether or not a TypeSerializer
can be safely used to read data written by a previous type serializer.
Typically, the compatibility of the new serializer is resolved by checking the serializer against the
TypeSerializerSnapshot
of the previous serializer. Depending on the type of the
resolved compatibility result, migration (i.e., reading bytes with the previous serializer and then writing
it again with the new serializer) may be required before the new serializer can be used.
Modifier and Type | Method and Description |
---|---|
static <T> TypeSerializerSchemaCompatibility<T> |
compatibleAfterMigration()
Returns a result that indicates that the new serializer can be used after migrating the written bytes, i.e.
|
static <T> TypeSerializerSchemaCompatibility<T> |
compatibleAsIs()
Returns a result that indicates that the new serializer is compatible and no migration is required.
|
static <T> TypeSerializerSchemaCompatibility<T> |
compatibleWithReconfiguredSerializer(TypeSerializer<T> reconfiguredSerializer)
Returns a result that indicates a reconfigured version of the new serializer is compatible, and should be
used instead of the original new serializer.
|
TypeSerializer<T> |
getReconfiguredSerializer()
Gets the reconfigured serializer.
|
static <T> TypeSerializerSchemaCompatibility<T> |
incompatible()
Returns a result that indicates there is no possible way for the new serializer to be use-able.
|
boolean |
isCompatibleAfterMigration()
Returns whether or not the type of the compatibility is
Type#COMPATIBLE_AFTER_MIGRATION . |
boolean |
isCompatibleAsIs()
Returns whether or not the type of the compatibility is
Type#COMPATIBLE_AS_IS . |
boolean |
isCompatibleWithReconfiguredSerializer()
Returns whether or not the type of the compatibility is
Type#COMPATIBLE_WITH_RECONFIGURED_SERIALIZER . |
boolean |
isIncompatible()
Returns whether or not the type of the compatibility is
Type#INCOMPATIBLE . |
String |
toString() |
public static <T> TypeSerializerSchemaCompatibility<T> compatibleAsIs()
public static <T> TypeSerializerSchemaCompatibility<T> compatibleAfterMigration()
public static <T> TypeSerializerSchemaCompatibility<T> compatibleWithReconfiguredSerializer(TypeSerializer<T> reconfiguredSerializer)
reconfiguredSerializer
- the reconfigured version of the new serializer.public static <T> TypeSerializerSchemaCompatibility<T> incompatible()
In this case, there is no possible way for the new serializer to continue to be used, even with migration. Recovery of the Flink job will fail.
public boolean isCompatibleAsIs()
Type#COMPATIBLE_AS_IS
.Type#COMPATIBLE_AS_IS
.public boolean isCompatibleAfterMigration()
Type#COMPATIBLE_AFTER_MIGRATION
.Type#COMPATIBLE_AFTER_MIGRATION
.public boolean isCompatibleWithReconfiguredSerializer()
Type#COMPATIBLE_WITH_RECONFIGURED_SERIALIZER
.Type#COMPATIBLE_WITH_RECONFIGURED_SERIALIZER
.public TypeSerializer<T> getReconfiguredSerializer()
isCompatibleWithReconfiguredSerializer()
is false
.public boolean isIncompatible()
Type#INCOMPATIBLE
.Type#INCOMPATIBLE
.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.