Package io.debezium.relational
Class RelationalDatabaseConnectorConfig
java.lang.Object
io.debezium.config.CommonConnectorConfig
io.debezium.relational.RelationalDatabaseConnectorConfig
- Direct Known Subclasses:
HistorizedRelationalDatabaseConnectorConfig
Configuration options shared across the relational CDC connectors.
- Author:
- Gunnar Morling
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The set of predefined DecimalHandlingMode options or aliases.static enum
The set of predefined DecimalHandlingMode options or aliases.Nested classes/interfaces inherited from class io.debezium.config.CommonConnectorConfig
CommonConnectorConfig.BinaryHandlingMode, CommonConnectorConfig.EventConvertingFailureHandlingMode, CommonConnectorConfig.EventProcessingFailureHandlingMode, CommonConnectorConfig.FieldNameAdjustmentMode, CommonConnectorConfig.SchemaNameAdjustmentMode, CommonConnectorConfig.SnapshotQueryMode, CommonConnectorConfig.Version, CommonConnectorConfig.WatermarkStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Field
A comma-separated list of regular expressions that match fully-qualified names of columns to be excluded from monitoring and change messages.static final Field
A comma-separated list of regular expressions that match fully-qualified names of columns to be excluded from monitoring and change messages.static final String
private final Tables.ColumnNameFilter
private final boolean
protected static final ConfigDefinition
static final Field
A comma-separated list of regular expressions that match database names to be excluded from monitoring.protected static final String
static final Field
A comma-separated list of regular expressions that match database names to be monitored.static final String
protected static final String
static final Field
static final Field
static final long
static final String
private final FieldNameSelector.FieldNamer
<Column> private final String
static final Field
static final Pattern
static final Field
static final Field
private final JdbcConfiguration
private final Key.KeyMapper
private static final org.slf4j.Logger
static final Field
static final Field
static final Field
static final Field
static final Field
static final Field
static final Field
static final Field
static final Field
A comma-separated list of regular expressions that match schema names to be excluded from monitoring.protected static final String
static final Field
A comma-separated list of regular expressions that match schema names to be monitored.static final String
protected static final String
static final Field
static final Field
static final Field
static final Field
static final Field
A comma-separated list of regular expressions that match the fully-qualified names of tables to be excluded from monitoring.protected static final String
static final Field
static final Field
A comma-separated list of regular expressions that match the fully-qualified names of tables to be monitored.static final String
protected static final String
private final RelationalTableFilters
private final Selectors.TableIdToStringMapper
private final TemporalPrecisionMode
static final Field
static final Field
static final Field
static final Field
Fields inherited from class io.debezium.config.CommonConnectorConfig
ADVANCED_METRICS_ENABLE, beanRegistry, BINARY_HANDLING_MODE, CUSTOM_CONVERTERS, CUSTOM_METRIC_TAGS, CUSTOM_POST_PROCESSORS, CUSTOM_RETRIABLE_EXCEPTION, DATABASE_CONFIG_PREFIX, DEFAULT_MAX_BATCH_SIZE, DEFAULT_MAX_QUEUE_SIZE, DEFAULT_MAX_QUEUE_SIZE_IN_BYTES, DEFAULT_MAX_RETRIES, DEFAULT_POLL_INTERVAL_MILLIS, DEFAULT_QUERY_FETCH_SIZE, DEFAULT_RETRIABLE_RESTART_WAIT, DRIVER_CONFIG_PREFIX, ERRORS_MAX_RETRIES, EVENT_CONVERTING_FAILURE_HANDLING_MODE, EVENT_PROCESSING_FAILURE_HANDLING_MODE, EXECUTOR_SHUTDOWN_TIMEOUT_SEC, FIELD_NAME_ADJUSTMENT_MODE, INCREMENTAL_SNAPSHOT_ALLOW_SCHEMA_CHANGES, INCREMENTAL_SNAPSHOT_CHUNK_SIZE, INCREMENTAL_SNAPSHOT_WATERMARKING_STRATEGY, isAdvancedMetricsEnabled, isLogPositionCheckEnabled, LOG_POSITION_CHECK_ENABLED, logicalName, MAX_BATCH_SIZE, MAX_QUEUE_SIZE, MAX_QUEUE_SIZE_IN_BYTES, MAX_RETRIES_ON_ERROR, MULTI_PARTITION_MODE, NOTIFICATION_CONFIGURATION_FIELD_PREFIX_STRING, NOTIFICATION_ENABLED_CHANNELS, POLL_INTERVAL_MS, PROVIDE_TRANSACTION_METADATA, QUERY_FETCH_SIZE, RETRIABLE_RESTART_WAIT, SCHEMA_NAME_ADJUSTMENT_MODE, serviceRegistry, SIGNAL_DATA_COLLECTION, SIGNAL_ENABLED_CHANNELS, SIGNAL_POLL_INTERVAL_MS, SKIP_MESSAGES_WITHOUT_CHANGE, SKIPPED_OPERATIONS, SNAPSHOT_DELAY_MS, SNAPSHOT_FETCH_SIZE, SNAPSHOT_LOCKING_MODE_CUSTOM_NAME, SNAPSHOT_LOCKING_MODE_PROPERTY_NAME, SNAPSHOT_MAX_THREADS, SNAPSHOT_MODE_CONFIGURATION_BASED_SNAPSHOT_DATA, SNAPSHOT_MODE_CONFIGURATION_BASED_SNAPSHOT_ON_DATA_ERROR, SNAPSHOT_MODE_CONFIGURATION_BASED_SNAPSHOT_ON_SCHEMA_ERROR, SNAPSHOT_MODE_CONFIGURATION_BASED_SNAPSHOT_SCHEMA, SNAPSHOT_MODE_CONFIGURATION_BASED_START_STREAM, SNAPSHOT_MODE_CUSTOM_NAME, SNAPSHOT_MODE_PROPERTY_NAME, SNAPSHOT_MODE_TABLES, SNAPSHOT_QUERY_MODE, SNAPSHOT_QUERY_MODE_CUSTOM_NAME, snapshotLockingModeCustomName, snapshotModeConfigurationBasedSnapshotData, snapshotModeConfigurationBasedSnapshotOnDataError, snapshotModeConfigurationBasedSnapshotOnSchemaError, snapshotModeConfigurationBasedSnapshotSchema, snapshotModeConfigurationBasedStream, snapshotQueryMode, snapshotQueryModeCustomName, SOURCE_INFO_STRUCT_MAKER, STREAMING_DELAY_MS, TASK_ID, TOMBSTONES_ON_DELETE, TOPIC_NAME_PATTERN, TOPIC_NAMING_STRATEGY, TOPIC_PREFIX, TRANSACTION_METADATA_FACTORY
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
RelationalDatabaseConnectorConfig
(Configuration config, Tables.TableFilter systemTablesFilter, Selectors.TableIdToStringMapper tableIdMapper, int defaultSnapshotFetchSize, ColumnFilterMode columnFilterMode, boolean useCatalogBeforeSchema) -
Method Summary
Modifier and TypeMethodDescriptioncreateHeartbeat
(TopicNamingStrategy topicNamingStrategy, SchemaNameAdjuster schemaNameAdjuster, HeartbeatConnectionProvider connectionProvider, HeartbeatErrorHandler errorHandler) Returns the Decimal mode Enum fordecimal.handling.mode
configuration.Returns a "raw" configuration object exposing all the database driver related settings, without the "database." prefix.Returns any SELECT overrides, if present.Returns the temporal precision mode Enum fortime.precision.mode
configuration.byte[]
boolean
boolean
boolean
private static int
validateColumnExcludeList
(Configuration config, Field field, Field.ValidationOutput problems) private static int
validateDatabaseExcludeList
(Configuration config, Field field, Field.ValidationOutput problems) private static int
validateHostname
(Configuration config, Field field, Field.ValidationOutput problems) private static int
validateMessageKeyColumnsField
(Configuration config, Field field, Field.ValidationOutput problems) private static int
validateSchemaExcludeList
(Configuration config, Field field, Field.ValidationOutput problems) private static int
validateTableBlacklist
(Configuration config, Field field, Field.ValidationOutput problems) private static int
validateTableExcludeList
(Configuration config, Field field, Field.ValidationOutput problems) Methods inherited from class io.debezium.config.CommonConnectorConfig
binaryHandlingMode, createCustomMetricTags, customConverterRegistry, customRetriableException, fieldNameAdjuster, getBeanRegistry, getConfig, getConnectorName, getContextName, getCustomMetricTags, getDataCollectionsToBeSnapshotted, getEnabledChannels, getEnabledNotificationChannels, getEventConvertingFailureHandlingMode, getEventProcessingFailureHandlingMode, getHeartbeatInterval, getHeartbeatTopicsPrefix, getIncrementalSnapshotChunkSize, getIncrementalSnapshotWatermarkingStrategy, getLogicalName, getMaxBatchSize, getMaxQueueSize, getMaxQueueSizeInBytes, getMaxRetriesOnError, getNotificationTopic, getPollInterval, getQueryFetchSize, getServiceRegistry, getSignalingDataCollectionId, getSignalPollInterval, getSkippedOperations, getSnapshotDelay, getSnapshotFetchSize, getSnapshotLockingMode, getSnapshotMaxThreads, getSnapshotMode, getSnapshotModeCustomName, getSourceInfoStructMaker, getSourceInfoStructMaker, getSourceInfoStructMaker, getStreamingDelay, getTaskId, getTopicNamingStrategy, getTopicNamingStrategy, getTransactionMetadataFactory, getTransactionMetadataFactory, isAdvancedMetricsEnabled, isEmitTombstoneOnDelete, isIncrementalSnapshotSchemaChangesEnabled, isLogPositionCheckEnabled, isSignalDataCollection, parseSignallingMessage, schemaNameAdjuster, shouldProvideTransactionMetadata, skipMessagesWithoutChange, snapshotLockingModeCustomName, snapshotModeConfigurationBasedSnapshotData, snapshotModeConfigurationBasedSnapshotOnDataError, snapshotModeConfigurationBasedSnapshotOnSchemaError, snapshotModeConfigurationBasedSnapshotSchema, snapshotModeConfigurationBasedStream, snapshotQueryMode, snapshotQueryModeCustomName, supportsOperationFiltering, supportsSchemaChangesDuringIncrementalSnapshot, validate, validateAndRecord, validateSkippedOperation, validateTopicName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
SCHEMA_INCLUDE_LIST_NAME
- See Also:
-
SCHEMA_EXCLUDE_LIST_NAME
- See Also:
-
DATABASE_INCLUDE_LIST_NAME
- See Also:
-
DATABASE_EXCLUDE_LIST_NAME
- See Also:
-
TABLE_EXCLUDE_LIST_NAME
- See Also:
-
TABLE_INCLUDE_LIST_NAME
- See Also:
-
TABLE_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG
- See Also:
-
COLUMN_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG
- See Also:
-
SCHEMA_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG
- See Also:
-
DATABASE_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG
- See Also:
-
DEFAULT_SNAPSHOT_LOCK_TIMEOUT_MILLIS
public static final long DEFAULT_SNAPSHOT_LOCK_TIMEOUT_MILLIS -
DEFAULT_UNAVAILABLE_VALUE_PLACEHOLDER
- See Also:
-
HOSTNAME_PATTERN
-
HOSTNAME
-
PORT
-
USER
-
PASSWORD
-
DATABASE_NAME
-
QUERY_TIMEOUT_MS
-
TABLE_INCLUDE_LIST
A comma-separated list of regular expressions that match the fully-qualified names of tables to be monitored. Fully-qualified names for tables are of the form<databaseName>.<tableName>
or<databaseName>.<schemaName>.<tableName>
. Must not be used withTABLE_EXCLUDE_LIST
, and superseded by database inclusions/exclusions. -
TABLE_EXCLUDE_LIST
A comma-separated list of regular expressions that match the fully-qualified names of tables to be excluded from monitoring. Fully-qualified names for tables are of the form<databaseName>.<tableName>
or<databaseName>.<schemaName>.<tableName>
. Must not be used withTABLE_INCLUDE_LIST
. -
TABLE_IGNORE_BUILTIN
-
COLUMN_EXCLUDE_LIST
A comma-separated list of regular expressions that match fully-qualified names of columns to be excluded from monitoring and change messages. The exact form of fully qualified names for columns might vary between connector types. For instance, they could be of the form<databaseName>.<tableName>.<columnName>
or<schemaName>.<tableName>.<columnName>
or<databaseName>.<schemaName>.<tableName>.<columnName>
. -
COLUMN_INCLUDE_LIST
A comma-separated list of regular expressions that match fully-qualified names of columns to be excluded from monitoring and change messages. The exact form of fully qualified names for columns might vary between connector types. For instance, they could be of the form<databaseName>.<tableName>.<columnName>
or<schemaName>.<tableName>.<columnName>
or<databaseName>.<schemaName>.<tableName>.<columnName>
. -
MSG_KEY_COLUMNS
-
DECIMAL_HANDLING_MODE
-
SNAPSHOT_SELECT_STATEMENT_OVERRIDES_BY_TABLE
-
SCHEMA_INCLUDE_LIST
A comma-separated list of regular expressions that match schema names to be monitored. Must not be used withSCHEMA_EXCLUDE_LIST
. -
SCHEMA_EXCLUDE_LIST
A comma-separated list of regular expressions that match schema names to be excluded from monitoring. Must not be used withSCHEMA_INCLUDE_LIST
. -
DATABASE_INCLUDE_LIST
A comma-separated list of regular expressions that match database names to be monitored. Must not be used withDATABASE_EXCLUDE_LIST
. -
DATABASE_EXCLUDE_LIST
A comma-separated list of regular expressions that match database names to be excluded from monitoring. Must not be used withDATABASE_INCLUDE_LIST
. -
TIME_PRECISION_MODE
-
SNAPSHOT_LOCK_TIMEOUT_MS
-
INCLUDE_SCHEMA_CHANGES
-
INCLUDE_SCHEMA_COMMENTS
-
MASK_COLUMN_WITH_HASH
-
MASK_COLUMN
-
TRUNCATE_COLUMN
-
PROPAGATE_COLUMN_SOURCE_TYPE
-
PROPAGATE_DATATYPE_SOURCE_TYPE
-
SNAPSHOT_FULL_COLUMN_SCAN_FORCE
-
UNAVAILABLE_VALUE_PLACEHOLDER
-
SNAPSHOT_TABLES_ORDER_BY_ROW_COUNT
-
CONFIG_DEFINITION
-
tableFilters
-
columnFilter
-
columnsFiltered
private final boolean columnsFiltered -
temporalPrecisionMode
-
keyMapper
-
tableIdMapper
-
jdbcConfig
-
heartbeatActionQuery
-
fieldNamer
-
snapshotOrderByRowCount
-
-
Constructor Details
-
RelationalDatabaseConnectorConfig
protected RelationalDatabaseConnectorConfig(Configuration config, Tables.TableFilter systemTablesFilter, Selectors.TableIdToStringMapper tableIdMapper, int defaultSnapshotFetchSize, ColumnFilterMode columnFilterMode, boolean useCatalogBeforeSchema)
-
-
Method Details
-
getTableFilters
-
getDecimalMode
Returns the Decimal mode Enum fordecimal.handling.mode
configuration. This defaults toprecise
if nothing is provided. -
getTemporalPrecisionMode
Returns the temporal precision mode Enum fortime.precision.mode
configuration. This defaults toadaptive
if nothing is provided. -
getKeyMapper
-
getJdbcConfig
Returns a "raw" configuration object exposing all the database driver related settings, without the "database." prefix. Typically used for passing through driver settings. -
getHeartbeatActionQuery
-
snapshotLockTimeout
-
schemaExcludeList
-
schemaIncludeList
-
tableExcludeList
-
tableIncludeList
-
getColumnFilter
-
isColumnsFiltered
public boolean isColumnsFiltered() -
isFullColumnScanRequired
-
snapshotOrderByRowCount
-
validateColumnExcludeList
private static int validateColumnExcludeList(Configuration config, Field field, Field.ValidationOutput problems) -
isSchemaChangesHistoryEnabled
public boolean isSchemaChangesHistoryEnabled()- Overrides:
isSchemaChangesHistoryEnabled
in classCommonConnectorConfig
- Returns:
- true if the connector should emit messages about schema changes into a public facing topic.
-
isSchemaCommentsHistoryEnabled
public boolean isSchemaCommentsHistoryEnabled()- Overrides:
isSchemaCommentsHistoryEnabled
in classCommonConnectorConfig
- Returns:
- true if the connector should emit messages which include table and column comments.
-
getTableIdMapper
-
validateTableBlacklist
private static int validateTableBlacklist(Configuration config, Field field, Field.ValidationOutput problems) -
validateTableExcludeList
private static int validateTableExcludeList(Configuration config, Field field, Field.ValidationOutput problems) -
getSnapshotSelectOverridesByTable
Returns any SELECT overrides, if present. -
createHeartbeat
public Heartbeat createHeartbeat(TopicNamingStrategy topicNamingStrategy, SchemaNameAdjuster schemaNameAdjuster, HeartbeatConnectionProvider connectionProvider, HeartbeatErrorHandler errorHandler) - Overrides:
createHeartbeat
in classCommonConnectorConfig
-
validateSchemaExcludeList
private static int validateSchemaExcludeList(Configuration config, Field field, Field.ValidationOutput problems) -
validateDatabaseExcludeList
private static int validateDatabaseExcludeList(Configuration config, Field field, Field.ValidationOutput problems) -
validateMessageKeyColumnsField
private static int validateMessageKeyColumnsField(Configuration config, Field field, Field.ValidationOutput problems) -
validateHostname
private static int validateHostname(Configuration config, Field field, Field.ValidationOutput problems) -
getFieldNamer
-