Class HistorizedRelationalDatabaseConnectorConfig


public abstract class HistorizedRelationalDatabaseConnectorConfig extends RelationalDatabaseConnectorConfig
Configuration options shared across the relational CDC connectors which use a persistent database schema history.
Author:
Gunnar Morling
  • Field Details

    • DEFAULT_SNAPSHOT_FETCH_SIZE

      protected static final int DEFAULT_SNAPSHOT_FETCH_SIZE
      See Also:
    • DEFAULT_SCHEMA_HISTORY

      private static final String DEFAULT_SCHEMA_HISTORY
      See Also:
    • useCatalogBeforeSchema

      private final boolean useCatalogBeforeSchema
    • connectorClass

      private final Class<? extends org.apache.kafka.connect.source.SourceConnector> connectorClass
    • multiPartitionMode

      private final boolean multiPartitionMode
    • ddlFilter

      private final Predicate<String> ddlFilter
    • skipUnparseableDDL

      protected boolean skipUnparseableDDL
    • storeOnlyCapturedTablesDdl

      protected boolean storeOnlyCapturedTablesDdl
    • storeOnlyCapturedDatabasesDdl

      protected boolean storeOnlyCapturedDatabasesDdl
    • SCHEMA_HISTORY

      public static final Field SCHEMA_HISTORY
      The database schema history class is hidden in the #configDef() since that is designed to work with a user interface, and in these situations using Kafka is the only way to go.
    • SKIP_UNPARSEABLE_DDL_STATEMENTS

      public static final Field SKIP_UNPARSEABLE_DDL_STATEMENTS
    • STORE_ONLY_CAPTURED_TABLES_DDL

      public static final Field STORE_ONLY_CAPTURED_TABLES_DDL
    • STORE_ONLY_CAPTURED_DATABASES_DDL

      public static final Field STORE_ONLY_CAPTURED_DATABASES_DDL
    • CONFIG_DEFINITION

      protected static final ConfigDefinition CONFIG_DEFINITION
  • Constructor Details

    • HistorizedRelationalDatabaseConnectorConfig

      protected HistorizedRelationalDatabaseConnectorConfig(Class<? extends org.apache.kafka.connect.source.SourceConnector> connectorClass, Configuration config, Tables.TableFilter systemTablesFilter, boolean useCatalogBeforeSchema, int defaultSnapshotFetchSize, ColumnFilterMode columnFilterMode, boolean multiPartitionMode)
    • HistorizedRelationalDatabaseConnectorConfig

      protected HistorizedRelationalDatabaseConnectorConfig(Class<? extends org.apache.kafka.connect.source.SourceConnector> connectorClass, Configuration config, Tables.TableFilter systemTablesFilter, Selectors.TableIdToStringMapper tableIdMapper, boolean useCatalogBeforeSchema, ColumnFilterMode columnFilterMode, boolean multiPartitionMode)
    • HistorizedRelationalDatabaseConnectorConfig

      protected HistorizedRelationalDatabaseConnectorConfig(Class<? extends org.apache.kafka.connect.source.SourceConnector> connectorClass, Configuration config, Tables.TableFilter systemTablesFilter, Selectors.TableIdToStringMapper tableIdMapper, boolean useCatalogBeforeSchema, int defaultSnapshotFetchSize, ColumnFilterMode columnFilterMode, boolean multiPartitionMode)
  • Method Details

    • getSchemaHistory

      public SchemaHistory getSchemaHistory()
      Returns a configured (but not yet started) instance of the database schema history.
    • useCatalogBeforeSchema

      public boolean useCatalogBeforeSchema()
    • multiPartitionMode

      public boolean multiPartitionMode()
    • createDdlFilter

      private Predicate<String> createDdlFilter(Configuration config)
    • ddlFilter

      public Predicate<String> ddlFilter()
    • skipUnparseableDdlStatements

      public boolean skipUnparseableDdlStatements()
    • storeOnlyCapturedTables

      public boolean storeOnlyCapturedTables()
    • storeOnlyCapturedDatabases

      public boolean storeOnlyCapturedDatabases()
    • getHistoryRecordComparator

      protected abstract HistoryRecordComparator getHistoryRecordComparator()
      Returns a comparator to be used when recovering records from the schema history, making sure no history entries newer than the offset we resume from are recovered (which could happen when restarting a connector after history records have been persisted but no new offset has been committed yet).