Package io.debezium.connector.mariadb
Class MariaDbConnectorConfig
java.lang.Object
io.debezium.config.CommonConnectorConfig
io.debezium.relational.RelationalDatabaseConnectorConfig
io.debezium.relational.HistorizedRelationalDatabaseConnectorConfig
io.debezium.connector.binlog.BinlogConnectorConfig
io.debezium.connector.mariadb.MariaDbConnectorConfig
Configuration properties for MariaDB.
- Author:
- Chris Cranford
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCustomBinlogConnectorConfig.SnapshotLockingStrategyfor MariaDB.static enumThe 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.SnapshotModeNested classes/interfaces inherited from class io.debezium.relational.RelationalDatabaseConnectorConfig
io.debezium.relational.RelationalDatabaseConnectorConfig.DecimalHandlingMode, io.debezium.relational.RelationalDatabaseConnectorConfig.SnapshotTablesRowCountOrderNested classes/interfaces inherited from class io.debezium.config.CommonConnectorConfig
io.debezium.config.CommonConnectorConfig.BinaryHandlingMode, io.debezium.config.CommonConnectorConfig.EventConvertingFailureHandlingMode, io.debezium.config.CommonConnectorConfig.EventProcessingFailureHandlingMode, io.debezium.config.CommonConnectorConfig.FieldNameAdjustmentMode, io.debezium.config.CommonConnectorConfig.SchemaNameAdjustmentMode, io.debezium.config.CommonConnectorConfig.SnapshotQueryMode, io.debezium.config.CommonConnectorConfig.Version, io.debezium.config.CommonConnectorConfig.WatermarkStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic io.debezium.config.Field.SetThe set ofFields defined as part of this connector configuration.private static final io.debezium.config.ConfigDefinitionprivate static final intFor MariaDB to mimic MySQL behavior usingInteger.MIN_VALUE, the default fetch size must explicitly be set to1.static final io.debezium.config.FieldMariaDB GTID format uses "domain-server-sequence".static final io.debezium.config.FieldMariaDB GTID format uses "domain-server-sequence".private final GtidSetFactoryprivate static final org.slf4j.Loggerstatic final io.debezium.config.Fieldprivate final MariaDbConnectorConfig.SnapshotLockingModeprivate final BinlogConnectorConfig.SnapshotLockingStrategystatic final io.debezium.config.FieldFields 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_DISCONNECTFields inherited from class io.debezium.relational.HistorizedRelationalDatabaseConnectorConfig
DEFAULT_SNAPSHOT_FETCH_SIZE, SCHEMA_HISTORY, SKIP_UNPARSEABLE_DDL_STATEMENTS, skipUnparseableDDL, STORE_ONLY_CAPTURED_TABLES_DDL, storeOnlyCapturedDatabasesDdl, storeOnlyCapturedTablesDdlFields 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, USERFields inherited from class io.debezium.config.CommonConnectorConfig
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, 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.ConfigDefprotected io.debezium.relational.history.HistoryRecordComparatorprotected io.debezium.connector.SourceInfoStructMaker<? extends io.debezium.connector.AbstractSourceInfo>getSourceInfoStructMaker(io.debezium.config.CommonConnectorConfig.Version version) private static intvalidateSnapshotLockingMode(io.debezium.config.Configuration config, io.debezium.config.Field field, io.debezium.config.Field.ValidationOutput problems) Validate the new snapshot.locking.mode configuration.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, usesNonGracefulDisconnectMethods inherited from class io.debezium.relational.HistorizedRelationalDatabaseConnectorConfig
ddlFilter, getSchemaHistory, multiPartitionMode, skipUnparseableDdlStatements, storeOnlyCapturedDatabases, storeOnlyCapturedTables, useCatalogBeforeSchemaMethods 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, tableIncludeListMethods 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, 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_NON_STREAMING_FETCH_SIZE
private static final int DEFAULT_NON_STREAMING_FETCH_SIZEFor MariaDB to mimic MySQL behavior usingInteger.MIN_VALUE, the default fetch size must explicitly be set to1. This is because MariaDB drivers 3.x+ do not support the old non-compliant JDBC-spec style that MySQL uses.- See Also:
-
SOURCE_INFO_STRUCT_MAKER
public static final io.debezium.config.Field SOURCE_INFO_STRUCT_MAKER -
SNAPSHOT_LOCKING_MODE
public static final io.debezium.config.Field SNAPSHOT_LOCKING_MODE -
GTID_SOURCE_INCLUDES
public static final io.debezium.config.Field GTID_SOURCE_INCLUDESMariaDB GTID format uses "domain-server-sequence". This configuration should specify a comma-separated list of regular expressions that match the "domain-server" tuples when locating the binlog position in a MariaDB server. Only the GTID ranges that have sources that match one of these patterns will be used. -
GTID_SOURCE_EXCLUDES
public static final io.debezium.config.Field GTID_SOURCE_EXCLUDESMariaDB GTID format uses "domain-server-sequence". This configuration should specify a comma-separataed list of regular expressions that match the "domain-server" tuples when locating the binlog position in a MariaDB server. GTIDs that do not match any of these patterns will be used. -
CONFIG_DEFINITION
private static final io.debezium.config.ConfigDefinition CONFIG_DEFINITION -
ALL_FIELDS
public static io.debezium.config.Field.Set ALL_FIELDSThe set ofFields defined as part of this connector configuration. -
gtidSetFactory
-
gtidSourceFilter
-
snapshotLockingMode
-
snapshotLockingStrategy
-
-
Constructor Details
-
MariaDbConnectorConfig
public MariaDbConnectorConfig(io.debezium.config.Configuration config)
-
-
Method Details
-
configDef
protected static org.apache.kafka.common.config.ConfigDef configDef() -
getSourceInfoStructMaker
protected io.debezium.connector.SourceInfoStructMaker<? extends io.debezium.connector.AbstractSourceInfo> getSourceInfoStructMaker(io.debezium.config.CommonConnectorConfig.Version version) - Specified by:
getSourceInfoStructMakerin classio.debezium.config.CommonConnectorConfig
-
getContextName
- Specified by:
getContextNamein classio.debezium.config.CommonConnectorConfig
-
getConnectorName
- Specified by:
getConnectorNamein classio.debezium.config.CommonConnectorConfig
-
getGtidSourceFilter
- Specified by:
getGtidSourceFilterin classBinlogConnectorConfig
-
getGtidSetFactory
- Specified by:
getGtidSetFactoryin classBinlogConnectorConfig
-
getHistoryRecordComparator
protected io.debezium.relational.history.HistoryRecordComparator getHistoryRecordComparator()- Specified by:
getHistoryRecordComparatorin classio.debezium.relational.HistorizedRelationalDatabaseConnectorConfig
-
getSnapshotLockingStrategy
- Specified by:
getSnapshotLockingStrategyin classBinlogConnectorConfig
-
getSnapshotLockingMode
- Specified by:
getSnapshotLockingModein classio.debezium.config.CommonConnectorConfig
-
validateSnapshotLockingMode
private static int validateSnapshotLockingMode(io.debezium.config.Configuration config, io.debezium.config.Field field, io.debezium.config.Field.ValidationOutput problems) Validate the new snapshot.locking.mode configuration.- Parameters:
config- the connector configurationfield- the field being validatedproblems- the validation output- Returns:
- the number of problems detected
-