org.apache.flink.api.common.typeutils.base.TypeSerializerSingleton Java Examples
The following examples show how to use
org.apache.flink.api.common.typeutils.base.TypeSerializerSingleton.
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
Source File: ParameterlessTypeSerializerConfig.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public TypeSerializerSchemaCompatibility<T> resolveSchemaCompatibility(TypeSerializer<T> newSerializer) { if (newSerializer instanceof TypeSerializerSingleton) { TypeSerializerSingleton<T> singletonSerializer = (TypeSerializerSingleton<T>) newSerializer; return isCompatibleSerializationFormatIdentifier(serializationFormatIdentifier, singletonSerializer) ? TypeSerializerSchemaCompatibility.compatibleAsIs() : TypeSerializerSchemaCompatibility.incompatible(); } return super.resolveSchemaCompatibility(newSerializer); }
Example #2
Source File: ParameterlessTypeSerializerConfig.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
private static boolean isCompatibleSerializationFormatIdentifier( String identifier, TypeSerializerSingleton<?> newSingletonSerializer) { String name = newSingletonSerializer.getClass().getName(); // we also need to check canonical name because some singleton serializers were using that as the identifier String canonicalName = newSingletonSerializer.getClass().getCanonicalName(); return identifier.equals(name) || identifier.equals(canonicalName); }
Example #3
Source File: ParameterlessTypeSerializerConfig.java From flink with Apache License 2.0 | 5 votes |
@Override public TypeSerializerSchemaCompatibility<T> resolveSchemaCompatibility(TypeSerializer<T> newSerializer) { if (newSerializer instanceof TypeSerializerSingleton) { TypeSerializerSingleton<T> singletonSerializer = (TypeSerializerSingleton<T>) newSerializer; return isCompatibleSerializationFormatIdentifier(serializationFormatIdentifier, singletonSerializer) ? TypeSerializerSchemaCompatibility.compatibleAsIs() : TypeSerializerSchemaCompatibility.incompatible(); } return super.resolveSchemaCompatibility(newSerializer); }
Example #4
Source File: ParameterlessTypeSerializerConfig.java From flink with Apache License 2.0 | 5 votes |
private static boolean isCompatibleSerializationFormatIdentifier( String identifier, TypeSerializerSingleton<?> newSingletonSerializer) { String name = newSingletonSerializer.getClass().getName(); // we also need to check canonical name because some singleton serializers were using that as the identifier String canonicalName = newSingletonSerializer.getClass().getCanonicalName(); return identifier.equals(name) || identifier.equals(canonicalName); }
Example #5
Source File: ParameterlessTypeSerializerConfig.java From flink with Apache License 2.0 | 5 votes |
@Override public TypeSerializerSchemaCompatibility<T> resolveSchemaCompatibility(TypeSerializer<T> newSerializer) { if (newSerializer instanceof TypeSerializerSingleton) { TypeSerializerSingleton<T> singletonSerializer = (TypeSerializerSingleton<T>) newSerializer; return isCompatibleSerializationFormatIdentifier(serializationFormatIdentifier, singletonSerializer) ? TypeSerializerSchemaCompatibility.compatibleAsIs() : TypeSerializerSchemaCompatibility.incompatible(); } return super.resolveSchemaCompatibility(newSerializer); }
Example #6
Source File: ParameterlessTypeSerializerConfig.java From flink with Apache License 2.0 | 5 votes |
private static boolean isCompatibleSerializationFormatIdentifier( String identifier, TypeSerializerSingleton<?> newSingletonSerializer) { String name = newSingletonSerializer.getClass().getName(); // we also need to check canonical name because some singleton serializers were using that as the identifier String canonicalName = newSingletonSerializer.getClass().getCanonicalName(); return identifier.equals(name) || identifier.equals(canonicalName); }