public class FlinkDatabaseSchemaHistory extends Object implements io.debezium.relational.history.DatabaseHistory
FlinkDatabaseSchemaHistory only stores the latest schema of the monitored tables.
When recovering from the checkpoint, it should apply all the tables to the DatabaseSchema, which doesn't need to replay the history anymore.
Considering the data structure maintained in the FlinkDatabaseSchemaHistory is much
different from the FlinkDatabaseHistory, it's not compatible with the FlinkDatabaseHistory. Because it only maintains the latest schema of the table rather than all
history DDLs, it's useful to prevent OOM when meet massive history DDLs.
| Modifier and Type | Field and Description |
|---|---|
static String |
DATABASE_HISTORY_INSTANCE_NAME |
| Constructor and Description |
|---|
FlinkDatabaseSchemaHistory() |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(io.debezium.config.Configuration config,
io.debezium.relational.history.HistoryRecordComparator comparator,
io.debezium.relational.history.DatabaseHistoryListener listener,
boolean useCatalogBeforeSchema) |
boolean |
exists() |
void |
initializeStorage() |
static boolean |
isCompatible(Collection<SchemaRecord> records)
Determine whether the
FlinkDatabaseSchemaHistory is compatible with the specified
state. |
void |
record(Map<String,?> source,
Map<String,?> position,
String databaseName,
String ddl) |
void |
record(Map<String,?> source,
Map<String,?> position,
String databaseName,
String schemaName,
String ddl,
io.debezium.relational.history.TableChanges changes) |
void |
recover(Map<String,?> source,
Map<String,?> position,
io.debezium.relational.Tables schema,
io.debezium.relational.ddl.DdlParser ddlParser) |
boolean |
skipUnparseableDdlStatements() |
void |
start() |
void |
stop() |
boolean |
storageExists() |
boolean |
storeOnlyMonitoredTables() |
public static final String DATABASE_HISTORY_INSTANCE_NAME
public void configure(io.debezium.config.Configuration config,
io.debezium.relational.history.HistoryRecordComparator comparator,
io.debezium.relational.history.DatabaseHistoryListener listener,
boolean useCatalogBeforeSchema)
configure in interface io.debezium.relational.history.DatabaseHistorypublic void start()
start in interface io.debezium.relational.history.DatabaseHistorypublic void record(Map<String,?> source, Map<String,?> position, String databaseName, String ddl) throws io.debezium.relational.history.DatabaseHistoryException
record in interface io.debezium.relational.history.DatabaseHistoryio.debezium.relational.history.DatabaseHistoryExceptionpublic void record(Map<String,?> source, Map<String,?> position, String databaseName, String schemaName, String ddl, io.debezium.relational.history.TableChanges changes) throws io.debezium.relational.history.DatabaseHistoryException
record in interface io.debezium.relational.history.DatabaseHistoryio.debezium.relational.history.DatabaseHistoryExceptionpublic void recover(Map<String,?> source, Map<String,?> position, io.debezium.relational.Tables schema, io.debezium.relational.ddl.DdlParser ddlParser)
recover in interface io.debezium.relational.history.DatabaseHistorypublic void stop()
stop in interface io.debezium.relational.history.DatabaseHistorypublic boolean exists()
exists in interface io.debezium.relational.history.DatabaseHistorypublic boolean storageExists()
storageExists in interface io.debezium.relational.history.DatabaseHistorypublic void initializeStorage()
initializeStorage in interface io.debezium.relational.history.DatabaseHistorypublic boolean storeOnlyMonitoredTables()
storeOnlyMonitoredTables in interface io.debezium.relational.history.DatabaseHistorypublic boolean skipUnparseableDdlStatements()
skipUnparseableDdlStatements in interface io.debezium.relational.history.DatabaseHistorypublic static boolean isCompatible(Collection<SchemaRecord> records)
FlinkDatabaseSchemaHistory is compatible with the specified
state.Copyright © 2022 The Apache Software Foundation. All rights reserved.