Package io.debezium.connector.mysql
Class MySqlConnectorConfig
The configuration properties.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
CustomBinlogConnectorConfig.SnapshotLockingStrategy
for MySQL.static enum
The set of predefined Snapshot Locking Mode options.Nested classes/interfaces inherited from class io.debezium.connector.binlog.BinlogConnectorConfig
BinlogConnectorConfig.BigIntUnsignedHandlingMode, BinlogConnectorConfig.SecureConnectionMode, BinlogConnectorConfig.SnapshotLockingStrategy, BinlogConnectorConfig.SnapshotMode
Nested classes/interfaces inherited from class io.debezium.relational.RelationalDatabaseConnectorConfig
RelationalDatabaseConnectorConfig.DecimalHandlingMode, RelationalDatabaseConnectorConfig.SnapshotTablesRowCountOrder
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 Field.Set
The set ofField
s defined as part of this configuration.private static final ConfigDefinition
protected static final int
Minimum value
used for fetch size hint.static final Field
A comma-separated list of regular expressions that match source UUIDs in the GTID set used to find the binlog position in the MySQL server.static final Field
A comma-separated list of regular expressions that match source UUIDs in the GTID set used to find the binlog position in the MySQL server.private final GtidSetFactory
static final Field
static final Field
private static final org.slf4j.Logger
static final Field
private final MySqlConnectorConfig.SnapshotLockingMode
private final BinlogConnectorConfig.SnapshotLockingStrategy
static final Field
Fields inherited from class io.debezium.connector.binlog.BinlogConnectorConfig
BIGINT_UNSIGNED_HANDLING_MODE, BUFFER_SIZE_FOR_BINLOG_READER, BUILT_IN_DB_NAMES, CONNECTION_TIMEOUT_MS, ENABLE_TIME_ADJUSTER, EVENT_DESERIALIZATION_FAILURE_HANDLING_MODE, GTID_SOURCE_FILTER_DML_EVENTS, INCLUDE_SQL_QUERY, INCONSISTENT_SCHEMA_HANDLING_MODE, KEEP_ALIVE, KEEP_ALIVE_INTERVAL_MS, ON_CONNECT_STATEMENTS, PORT, READ_ONLY_CONNECTION, ROW_COUNT_FOR_STREAMING_RESULT_SETS, SERVER_ID, SERVER_ID_OFFSET, SNAPSHOT_MODE, SSL_KEYSTORE, SSL_KEYSTORE_PASSWORD, SSL_MODE, SSL_TRUSTSTORE, SSL_TRUSTSTORE_PASSWORD, STORE_ONLY_CAPTURED_DATABASES_DDL, TABLES_IGNORE_BUILTIN, TIME_PRECISION_MODE, TOPIC_NAMING_STRATEGY, USE_NONGRACEFUL_DISCONNECT
Fields inherited from class io.debezium.relational.HistorizedRelationalDatabaseConnectorConfig
SCHEMA_HISTORY, SKIP_UNPARSEABLE_DDL_STATEMENTS, skipUnparseableDDL, STORE_ONLY_CAPTURED_TABLES_DDL, storeOnlyCapturedDatabasesDdl, storeOnlyCapturedTablesDdl
Fields inherited from class io.debezium.relational.RelationalDatabaseConnectorConfig
COLUMN_EXCLUDE_LIST, COLUMN_INCLUDE_LIST, COLUMN_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG, DATABASE_EXCLUDE_LIST, DATABASE_EXCLUDE_LIST_NAME, DATABASE_INCLUDE_LIST, DATABASE_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG, DATABASE_INCLUDE_LIST_NAME, DATABASE_NAME, DECIMAL_HANDLING_MODE, DEFAULT_SNAPSHOT_LOCK_TIMEOUT_MILLIS, DEFAULT_UNAVAILABLE_VALUE_PLACEHOLDER, HOSTNAME, HOSTNAME_PATTERN, INCLUDE_SCHEMA_CHANGES, INCLUDE_SCHEMA_COMMENTS, MASK_COLUMN, MASK_COLUMN_WITH_HASH, MSG_KEY_COLUMNS, PASSWORD, PROPAGATE_COLUMN_SOURCE_TYPE, PROPAGATE_DATATYPE_SOURCE_TYPE, QUERY_TIMEOUT_MS, SCHEMA_EXCLUDE_LIST, SCHEMA_EXCLUDE_LIST_NAME, SCHEMA_INCLUDE_LIST, SCHEMA_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG, SCHEMA_INCLUDE_LIST_NAME, SNAPSHOT_FULL_COLUMN_SCAN_FORCE, SNAPSHOT_LOCK_TIMEOUT_MS, SNAPSHOT_SELECT_STATEMENT_OVERRIDES_BY_TABLE, SNAPSHOT_TABLES_ORDER_BY_ROW_COUNT, TABLE_EXCLUDE_LIST, TABLE_EXCLUDE_LIST_NAME, TABLE_IGNORE_BUILTIN, TABLE_INCLUDE_LIST, TABLE_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG, TABLE_INCLUDE_LIST_NAME, TRUNCATE_COLUMN, UNAVAILABLE_VALUE_PLACEHOLDER, USER
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, STREAMING_DELAY_MS, TASK_ID, TOMBSTONES_ON_DELETE, TOPIC_NAME_PATTERN, TOPIC_PREFIX, TRANSACTION_METADATA_FACTORY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static org.apache.kafka.common.config.ConfigDef
protected HistoryRecordComparator
protected SourceInfoStructMaker
<? extends AbstractSourceInfo> private static int
validateSnapshotLockingMode
(Configuration config, Field field, Field.ValidationOutput problems) Validate the new snapshot.locking.mode configuration, which replaces snapshot.minimal.locking.Methods inherited from class io.debezium.connector.binlog.BinlogConnectorConfig
getBigIntUnsignedHandlingMode, getBufferSizeForStreamingChangeEventSource, getConnectionTimeout, getHostName, getInconsistentSchemaFailureHandlingMode, getPassword, getPort, getRowCountForLargeTable, getServerId, getSnapshotMode, getSslMode, getTemporalPrecisionMode, getUserName, isBuiltInDatabase, isGlobalLockUseRequested, isNotBuiltInTable, isReadOnlyConnection, isSqlQueryIncluded, isSslModeEnabled, isTimeAdjustedEnabled, supportsOperationFiltering, supportsSchemaChangesDuringIncrementalSnapshot, useCursorFetch, usesNonGracefulDisconnect
Methods inherited from class io.debezium.relational.HistorizedRelationalDatabaseConnectorConfig
ddlFilter, getSchemaHistory, multiPartitionMode, skipUnparseableDdlStatements, storeOnlyCapturedDatabases, storeOnlyCapturedTables, useCatalogBeforeSchema
Methods inherited from class io.debezium.relational.RelationalDatabaseConnectorConfig
createHeartbeat, getColumnFilter, getDecimalMode, getFieldNamer, getHeartbeatActionQuery, getJdbcConfig, getKeyMapper, getSnapshotSelectOverridesByTable, getTableFilters, getTableIdMapper, getUnavailableValuePlaceholder, isColumnsFiltered, isFullColumnScanRequired, isSchemaChangesHistoryEnabled, isSchemaCommentsHistoryEnabled, schemaExcludeList, schemaIncludeList, snapshotLockTimeout, snapshotOrderByRowCount, tableExcludeList, tableIncludeList
Methods inherited from class io.debezium.config.CommonConnectorConfig
binaryHandlingMode, createCustomMetricTags, customConverterRegistry, customRetriableException, fieldNameAdjuster, getBeanRegistry, getConfig, getCustomMetricTags, getDataCollectionsToBeSnapshotted, getEnabledChannels, getEnabledNotificationChannels, getEventConvertingFailureHandlingMode, getEventProcessingFailureHandlingMode, getHeartbeatInterval, getHeartbeatTopicsPrefix, getIncrementalSnapshotChunkSize, getIncrementalSnapshotWatermarkingStrategy, getLogicalName, getMaxBatchSize, getMaxQueueSize, getMaxQueueSizeInBytes, getMaxRetriesOnError, getNotificationTopic, getPollInterval, getQueryFetchSize, getServiceRegistry, getSignalingDataCollectionId, getSignalPollInterval, getSkippedOperations, getSnapshotDelay, getSnapshotFetchSize, getSnapshotMaxThreads, getSnapshotModeCustomName, 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, validate, validateAndRecord, validateSkippedOperation, validateTopicName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
DEFAULT_SNAPSHOT_FETCH_SIZE
protected static final int DEFAULT_SNAPSHOT_FETCH_SIZEMinimum value
used for fetch size hint. See DBZ-94 for details.- See Also:
-
JDBC_DRIVER
-
JDBC_PROTOCOL
-
GTID_SOURCE_INCLUDES
A comma-separated list of regular expressions that match source UUIDs in the GTID set used to find the binlog position in the MySQL server. Only the GTID ranges that have sources matching one of these include patterns will be used. Must not be used withGTID_SOURCE_EXCLUDES
. -
GTID_SOURCE_EXCLUDES
A comma-separated list of regular expressions that match source UUIDs in the GTID set used to find the binlog position in the MySQL server. Only the GTID ranges that have sources matching none of these exclude patterns will be used. Must not be used withGTID_SOURCE_INCLUDES
. -
SNAPSHOT_LOCKING_MODE
-
SOURCE_INFO_STRUCT_MAKER
-
CONFIG_DEFINITION
-
ALL_FIELDS
The set ofField
s defined as part of this configuration. -
gtidSetFactory
-
gtidSourceFilter
-
snapshotLockingMode
-
snapshotLockingStrategy
-
-
Constructor Details
-
MySqlConnectorConfig
-
-
Method Details
-
configDef
protected static org.apache.kafka.common.config.ConfigDef configDef() -
getSnapshotLockingMode
- Specified by:
getSnapshotLockingMode
in classCommonConnectorConfig
-
getSnapshotLockingStrategy
- Specified by:
getSnapshotLockingStrategy
in classBinlogConnectorConfig
-
getSourceInfoStructMaker
protected SourceInfoStructMaker<? extends AbstractSourceInfo> getSourceInfoStructMaker(CommonConnectorConfig.Version version) - Specified by:
getSourceInfoStructMaker
in classCommonConnectorConfig
-
getContextName
- Specified by:
getContextName
in classCommonConnectorConfig
-
getConnectorName
- Specified by:
getConnectorName
in classCommonConnectorConfig
-
getGtidSourceFilter
- Specified by:
getGtidSourceFilter
in classBinlogConnectorConfig
-
getGtidSetFactory
- Specified by:
getGtidSetFactory
in classBinlogConnectorConfig
-
getHistoryRecordComparator
- Specified by:
getHistoryRecordComparator
in classHistorizedRelationalDatabaseConnectorConfig
-
validateSnapshotLockingMode
private static int validateSnapshotLockingMode(Configuration config, Field field, Field.ValidationOutput problems) Validate the new snapshot.locking.mode configuration, which replaces snapshot.minimal.locking. If minimal.locking is explicitly defined and locking.mode is NOT explicitly defined: - coerce minimal.locking into the new snap.locking.mode property. If minimal.locking is NOT explicitly defined and locking.mode IS explicitly defined: - use new locking.mode property. If BOTH minimal.locking and locking.mode ARE defined: - Throw a validation error.
-