DBZ-1003 Initialize database history

This commit is contained in:
Jiri Pechanec 2018-11-29 08:38:26 +01:00 committed by Gunnar Morling
parent 101bd8ef6d
commit 284ae98adf
2 changed files with 13 additions and 0 deletions

View File

@ -51,6 +51,17 @@ public void close() {
databaseHistory.stop();
}
/**
* Configures a storage used to store history, e.g. in Kafka case it creates topic with
* required parameters.
*/
@Override
public void initializeStorage() {
if (!databaseHistory.exists()) {
databaseHistory.initializeStorage();
}
}
/**
* Returns a new instance of the {@link DdlParser} to be used when recovering the schema from a previously persisted
* history.

View File

@ -21,4 +21,6 @@ public interface HistorizedDatabaseSchema<I extends DataCollectionId> extends Da
void applySchemaChange(SchemaChangeEvent schemaChange);
void recover(OffsetContext offset);
void initializeStorage();
}