/** * Returns a result that indicates that the new serializer is compatible and no migration is required. * The new serializer can continued to be used as is. * * @return a result that indicates migration is not required for the new serializer. */ public static <T> TypeSerializerSchemaCompatibility<T> compatibleAsIs() { return new TypeSerializerSchemaCompatibility<>(Type.COMPATIBLE_AS_IS, null); }
/** * Returns a result that indicates there is no possible way for the new serializer to be use-able. * This normally indicates that there is no common Java class between what the previous bytes can be * deserialized into and what can be written by the new serializer. * * <p>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. * * @return a result that indicates incompatibility between the new and previous serializer. */ public static <T> TypeSerializerSchemaCompatibility<T> incompatible() { return new TypeSerializerSchemaCompatibility<>(Type.INCOMPATIBLE, null); }
/** * Returns a result that indicates that the new serializer can be used after migrating the written bytes, i.e. * reading it with the old serializer and then writing it again with the new serializer. * * @return a result that indicates that the new serializer can be used after migrating the written bytes. */ public static <T> TypeSerializerSchemaCompatibility<T> compatibleAfterMigration() { return new TypeSerializerSchemaCompatibility<>(Type.COMPATIBLE_AFTER_MIGRATION, null); }
/** * Returns a result that indicates a reconfigured version of the new serializer is compatible, and should be * used instead of the original new serializer. * * @param reconfiguredSerializer the reconfigured version of the new serializer. * @return a result that indicates a reconfigured version of the new serializer is compatible, and should be * used instead of the original new serializer. */ public static <T> TypeSerializerSchemaCompatibility<T> compatibleWithReconfiguredSerializer(TypeSerializer<T> reconfiguredSerializer) { return new TypeSerializerSchemaCompatibility<>( Type.COMPATIBLE_WITH_RECONFIGURED_SERIALIZER, Preconditions.checkNotNull(reconfiguredSerializer)); }
/** * Returns a result that indicates that the new serializer is compatible and no migration is required. * The new serializer can continued to be used as is. * * @return a result that indicates migration is not required for the new serializer. */ public static <T> TypeSerializerSchemaCompatibility<T> compatibleAsIs() { return new TypeSerializerSchemaCompatibility<>(Type.COMPATIBLE_AS_IS, null); }
/** * Returns a result that indicates that the new serializer can be used after migrating the written bytes, i.e. * reading it with the old serializer and then writing it again with the new serializer. * * @return a result that indicates that the new serializer can be used after migrating the written bytes. */ public static <T> TypeSerializerSchemaCompatibility<T> compatibleAfterMigration() { return new TypeSerializerSchemaCompatibility<>(Type.COMPATIBLE_AFTER_MIGRATION, null); }
/** * Returns a result that indicates there is no possible way for the new serializer to be use-able. * This normally indicates that there is no common Java class between what the previous bytes can be * deserialized into and what can be written by the new serializer. * * <p>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. * * @return a result that indicates incompatibility between the new and previous serializer. */ public static <T> TypeSerializerSchemaCompatibility<T> incompatible() { return new TypeSerializerSchemaCompatibility<>(Type.INCOMPATIBLE, null); }