Java Code Examples for org.apache.flink.api.common.typeutils.CompositeTypeSerializerSnapshot

The following examples show how to use org.apache.flink.api.common.typeutils.CompositeTypeSerializerSnapshot. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
@SuppressWarnings("unchecked")
public TypeSerializerSchemaCompatibility<C> resolveSchemaCompatibility(TypeSerializer<C> newSerializer) {
	if (!(newSerializer instanceof ListSerializer)) {
		return super.resolveSchemaCompatibility(newSerializer);
	}

	return CompositeTypeSerializerUtil.delegateCompatibilityCheckToNewSnapshot(
		newSerializer,
		(CompositeTypeSerializerSnapshot<C, ? extends TypeSerializer>) new ListSerializerSnapshot<>(),
		getSingleNestedSerializerAndConfig().f1);
}
 
Example 2
Source Project: flink   Source File: CollectionSerializerConfigSnapshot.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
public TypeSerializerSchemaCompatibility<C> resolveSchemaCompatibility(TypeSerializer<C> newSerializer) {
	if (!(newSerializer instanceof ListSerializer)) {
		return super.resolveSchemaCompatibility(newSerializer);
	}

	return CompositeTypeSerializerUtil.delegateCompatibilityCheckToNewSnapshot(
		newSerializer,
		(CompositeTypeSerializerSnapshot<C, ? extends TypeSerializer>) new ListSerializerSnapshot<>(),
		getSingleNestedSerializerAndConfig().f1);
}
 
Example 3
Source Project: flink   Source File: CollectionSerializerConfigSnapshot.java    License: Apache License 2.0 5 votes vote down vote up
@Override
@SuppressWarnings("unchecked")
public TypeSerializerSchemaCompatibility<C> resolveSchemaCompatibility(TypeSerializer<C> newSerializer) {
	if (!(newSerializer instanceof ListSerializer)) {
		return super.resolveSchemaCompatibility(newSerializer);
	}

	return CompositeTypeSerializerUtil.delegateCompatibilityCheckToNewSnapshot(
		newSerializer,
		(CompositeTypeSerializerSnapshot<C, ? extends TypeSerializer>) new ListSerializerSnapshot<>(),
		getSingleNestedSerializerAndConfig().f1);
}
 
Example 4
Source Project: flink   Source File: TraversableSerializerSnapshot.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected CompositeTypeSerializerSnapshot.OuterSchemaCompatibility resolveOuterSchemaCompatibility(TraversableSerializer<T, E> newSerializer) {
	return (cbfCode.equals(newSerializer.cbfCode()))
		? OuterSchemaCompatibility.COMPATIBLE_AS_IS
		: OuterSchemaCompatibility.INCOMPATIBLE;
}
 
Example 5
Source Project: flink   Source File: Tuple2CaseClassSerializerSnapshot.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected CompositeTypeSerializerSnapshot.OuterSchemaCompatibility resolveOuterSchemaCompatibility(ScalaCaseClassSerializer<Tuple2<T1, T2>> newSerializer) {
	return (Objects.equals(type, newSerializer.getTupleClass()))
		? OuterSchemaCompatibility.COMPATIBLE_AS_IS
		: OuterSchemaCompatibility.INCOMPATIBLE;
}
 
Example 6
Source Project: flink   Source File: ScalaCaseClassSerializerSnapshot.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected CompositeTypeSerializerSnapshot.OuterSchemaCompatibility resolveOuterSchemaCompatibility(ScalaCaseClassSerializer<T> newSerializer) {
	return (Objects.equals(type, newSerializer.getTupleClass()))
		? OuterSchemaCompatibility.COMPATIBLE_AS_IS
		: OuterSchemaCompatibility.INCOMPATIBLE;
}