Interface SerializerConfig
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
SerializerConfigImpl
@PublicEvolving public interface SerializerConfig extends Serializable
A config to define the behavior for serializers in Flink job, it manages the registered types and serializers. The config is created from job configuration and used by Flink to create serializers for data types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconfigure(ReadableConfig configuration, ClassLoader classLoader)Sets all relevant options contained in theReadableConfigsuch as e.g.SerializerConfigcopy()LinkedHashMap<Class<?>,Class<? extends com.esotericsoftware.kryo.Serializer<?>>>getDefaultKryoSerializerClasses()Returns the registered default Kryo Serializer classes.LinkedHashSet<Class<?>>getRegisteredKryoTypes()Returns the registered Kryo types.LinkedHashSet<Class<?>>getRegisteredPojoTypes()Returns the registered POJO types.Map<Class<?>,Class<? extends TypeInfoFactory<?>>>getRegisteredTypeInfoFactories()Returns the registered type info factories.LinkedHashMap<Class<?>,Class<? extends com.esotericsoftware.kryo.Serializer<?>>>getRegisteredTypesWithKryoSerializerClasses()Returns the registered types with their Kryo Serializer classes.booleanhasGenericTypesDisabled()Checks whether generic types are supported.booleanisForceAvroEnabled()Returns whether the Apache Avro is the serializer for POJOs.TernaryBooleanisForceKryoAvroEnabled()Returns whether forces Flink to register Apache Avro classes in Kryo serializer.booleanisForceKryoEnabled()Returns whether Kryo is the serializer for POJOs.
-
-
-
Method Detail
-
getRegisteredTypesWithKryoSerializerClasses
LinkedHashMap<Class<?>,Class<? extends com.esotericsoftware.kryo.Serializer<?>>> getRegisteredTypesWithKryoSerializerClasses()
Returns the registered types with their Kryo Serializer classes.
-
getDefaultKryoSerializerClasses
LinkedHashMap<Class<?>,Class<? extends com.esotericsoftware.kryo.Serializer<?>>> getDefaultKryoSerializerClasses()
Returns the registered default Kryo Serializer classes.
-
getRegisteredKryoTypes
LinkedHashSet<Class<?>> getRegisteredKryoTypes()
Returns the registered Kryo types.
-
getRegisteredPojoTypes
LinkedHashSet<Class<?>> getRegisteredPojoTypes()
Returns the registered POJO types.
-
getRegisteredTypeInfoFactories
Map<Class<?>,Class<? extends TypeInfoFactory<?>>> getRegisteredTypeInfoFactories()
Returns the registered type info factories.
-
hasGenericTypesDisabled
boolean hasGenericTypesDisabled()
Checks whether generic types are supported. Generic types are types that go through Kryo during serialization.Generic types are enabled by default.
-
isForceKryoEnabled
boolean isForceKryoEnabled()
Returns whether Kryo is the serializer for POJOs.
-
isForceAvroEnabled
boolean isForceAvroEnabled()
Returns whether the Apache Avro is the serializer for POJOs.
-
isForceKryoAvroEnabled
TernaryBoolean isForceKryoAvroEnabled()
Returns whether forces Flink to register Apache Avro classes in Kryo serializer.
-
configure
void configure(ReadableConfig configuration, ClassLoader classLoader)
Sets all relevant options contained in theReadableConfigsuch as e.g.PipelineOptions.FORCE_KRYO.It will change the value of a setting only if a corresponding option was set in the
configuration. If a key is not present, the current value of a field will remain untouched.- Parameters:
configuration- a configuration to read the values fromclassLoader- a class loader to use when loading classes
-
copy
SerializerConfig copy()
-
-