Class RegistryAvroFormatFactory
- java.lang.Object
-
- org.apache.flink.formats.avro.registry.confluent.RegistryAvroFormatFactory
-
- All Implemented Interfaces:
DecodingFormatFactory<DeserializationSchema<RowData>>
,DeserializationFormatFactory
,EncodingFormatFactory<SerializationSchema<RowData>>
,Factory
,FormatFactory
,SerializationFormatFactory
@Internal public class RegistryAvroFormatFactory extends Object implements DeserializationFormatFactory, SerializationFormatFactory
Table format factory for providing configured instances of Schema Registry Avro to RowDataSerializationSchema
andDeserializationSchema
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
IDENTIFIER
-
Constructor Summary
Constructors Constructor Description RegistryAvroFormatFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Map<String,String>
buildOptionalPropertiesMap(ReadableConfig formatOptions)
DecodingFormat<DeserializationSchema<RowData>>
createDecodingFormat(DynamicTableFactory.Context context, ReadableConfig formatOptions)
Creates a format from the given context and format options.EncodingFormat<SerializationSchema<RowData>>
createEncodingFormat(DynamicTableFactory.Context context, ReadableConfig formatOptions)
Creates a format from the given context and format options.String
factoryIdentifier()
Returns a unique identifier among same factory interfaces.Set<ConfigOption<?>>
forwardOptions()
Returns a set ofConfigOption
that are directly forwarded to the runtime implementation but don't affect the final execution topology.Set<ConfigOption<?>>
optionalOptions()
Returns a set ofConfigOption
that an implementation of this factory consumes in addition toFactory.requiredOptions()
.Set<ConfigOption<?>>
requiredOptions()
Returns a set ofConfigOption
that an implementation of this factory requires in addition toFactory.optionalOptions()
.
-
-
-
Field Detail
-
IDENTIFIER
public static final String IDENTIFIER
- See Also:
- Constant Field Values
-
-
Method Detail
-
createDecodingFormat
public DecodingFormat<DeserializationSchema<RowData>> createDecodingFormat(DynamicTableFactory.Context context, ReadableConfig formatOptions)
Description copied from interface:DecodingFormatFactory
Creates a format from the given context and format options.The format options have been projected to top-level options (e.g. from
format.ignore-errors
toignore-errors
).- Specified by:
createDecodingFormat
in interfaceDecodingFormatFactory<DeserializationSchema<RowData>>
-
createEncodingFormat
public EncodingFormat<SerializationSchema<RowData>> createEncodingFormat(DynamicTableFactory.Context context, ReadableConfig formatOptions)
Description copied from interface:EncodingFormatFactory
Creates a format from the given context and format options.The format options have been projected to top-level options (e.g. from
format.ignore-errors
toignore-errors
).- Specified by:
createEncodingFormat
in interfaceEncodingFormatFactory<SerializationSchema<RowData>>
-
factoryIdentifier
public String factoryIdentifier()
Description copied from interface:Factory
Returns a unique identifier among same factory interfaces.For consistency, an identifier should be declared as one lower case word (e.g.
kafka
). If multiple factories exist for different versions, a version should be appended using "-" (e.g.elasticsearch-7
).- Specified by:
factoryIdentifier
in interfaceFactory
-
requiredOptions
public Set<ConfigOption<?>> requiredOptions()
Description copied from interface:Factory
Returns a set ofConfigOption
that an implementation of this factory requires in addition toFactory.optionalOptions()
.See the documentation of
Factory
for more information.- Specified by:
requiredOptions
in interfaceFactory
-
optionalOptions
public Set<ConfigOption<?>> optionalOptions()
Description copied from interface:Factory
Returns a set ofConfigOption
that an implementation of this factory consumes in addition toFactory.requiredOptions()
.See the documentation of
Factory
for more information.- Specified by:
optionalOptions
in interfaceFactory
-
forwardOptions
public Set<ConfigOption<?>> forwardOptions()
Description copied from interface:FormatFactory
Returns a set ofConfigOption
that are directly forwarded to the runtime implementation but don't affect the final execution topology.Options declared here can override options of the persisted plan during an enrichment phase. Since a restored topology is static, an implementer has to ensure that the declared options don't affect fundamental abilities such as
ChangelogMode
.For example, given a JSON format, if an option defines how to parse timestamps, changing the parsing behavior does not affect the pipeline topology and can be allowed. However, an option that defines whether the format results in a
ProjectableDecodingFormat
or not is not allowed. The wrapping connector and planner might not react to the changed abilities anymore.- Specified by:
forwardOptions
in interfaceFormatFactory
- See Also:
DynamicTableFactory.Context.getEnrichmentOptions()
-
buildOptionalPropertiesMap
@Nullable public static Map<String,String> buildOptionalPropertiesMap(ReadableConfig formatOptions)
-
-