Package org.apache.flink.cdc.common.sink
Interface MetadataApplier
-
- All Superinterfaces:
AutoCloseable,Serializable
- All Known Implementing Classes:
DorisMetadataApplier,FlussMetaDataApplier,HudiMetadataApplier,IcebergMetadataApplier,KafkaMetaDataApplier,MaxComputeMetadataApplier,OceanBaseMetadataApplier,PaimonMetadataApplier,StarRocksMetadataApplier,ValuesDatabase.ErrorOnChangeMetadataApplier,ValuesDatabase.ValuesMetadataApplier
@PublicEvolving public interface MetadataApplier extends Serializable, AutoCloseable
MetadataApplieris used to apply metadata changes to external systems.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanacceptsSchemaEvolutionType(SchemaChangeEventType schemaChangeEventType)Checks if this metadata applier should this event type.voidapplySchemaChange(SchemaChangeEvent schemaChangeEvent)Apply the givenSchemaChangeEventto external systems.default voidclose()Closes the metadata applier and its underlying resources.default Optional<ExistingTableSchemaExpansionSupport>getExistingTableSchemaExpansionSupport()Returns optional support for safely expanding an existing target table schema.default Set<SchemaChangeEventType>getSupportedSchemaEvolutionTypes()Checks what kind of schema change events downstream can handle.default MetadataAppliersetAcceptedSchemaEvolutionTypes(Set<SchemaChangeEventType> schemaEvolutionTypes)Sets enabled schema evolution event types of current metadata applier.
-
-
-
Method Detail
-
applySchemaChange
void applySchemaChange(SchemaChangeEvent schemaChangeEvent) throws SchemaEvolveException
Apply the givenSchemaChangeEventto external systems.- Throws:
SchemaEvolveException
-
getExistingTableSchemaExpansionSupport
@Experimental default Optional<ExistingTableSchemaExpansionSupport> getExistingTableSchemaExpansionSupport()
Returns optional support for safely expanding an existing target table schema.
-
setAcceptedSchemaEvolutionTypes
default MetadataApplier setAcceptedSchemaEvolutionTypes(Set<SchemaChangeEventType> schemaEvolutionTypes)
Sets enabled schema evolution event types of current metadata applier.
-
acceptsSchemaEvolutionType
default boolean acceptsSchemaEvolutionType(SchemaChangeEventType schemaChangeEventType)
Checks if this metadata applier should this event type.
-
getSupportedSchemaEvolutionTypes
default Set<SchemaChangeEventType> getSupportedSchemaEvolutionTypes()
Checks what kind of schema change events downstream can handle.
-
close
default void close() throws ExceptionCloses the metadata applier and its underlying resources.- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-