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 boolean useCatalogBeforeSchema
    • connectorClass

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

      private final boolean multiPartitionMode
    • 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.
    • 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)
  • 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()
    • 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).