Class MySqlConnectorAdapter
java.lang.Object
io.debezium.connector.mysql.strategy.mysql.MySqlConnectorAdapter
- All Implemented Interfaces:
ConnectorAdapter
- Direct Known Subclasses:
MariaDbHybridConnectorAdapter
This connector adapter provides a complete implementation for MySQL assuming that the
MySQL driver is used for connections.
- Author:
- Chris Cranford
-
Field Summary
Modifier and TypeFieldDescriptionprivate final MySqlBinaryLogClientConfigurator
private final MySqlConnectorConfig
private static final org.slf4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateConnection
(Configuration configuration) IncrementalSnapshotChangeEventSource<MySqlPartition,
? extends io.debezium.spi.schema.DataCollectionId> createIncrementalSnapshotChangeEventSource
(MySqlConnectorConfig connectorConfig, AbstractConnectorConnection connection, EventDispatcher<MySqlPartition, ? extends io.debezium.spi.schema.DataCollectionId> dispatcher, MySqlDatabaseSchema schema, Clock clock, SnapshotProgressListener<MySqlPartition> snapshotProgressListener, DataChangeEventListener<MySqlPartition> dataChangeEventListener, NotificationService<MySqlPartition, MySqlOffsetContext> notificationService) <T> IncrementalSnapshotContext<T>
getJavaEncodingForCharSet
(String charSetName) getReadOnlyIncrementalSnapshotSignalOffset
(MySqlOffsetContext previousOffsets) getRecordingQueryFromEvent
(com.github.shyiko.mysql.binlog.event.EventData eventData) <T> IncrementalSnapshotContext<T>
loadIncrementalSnapshotContextFromOffset
(Map<String, ?> offset) private MySqlFieldReader
void
setOffsetContextBinlogPositionAndGtidDetailsForSnapshot
(MySqlOffsetContext offsetContext, AbstractConnectorConnection connection) Sets the offset context binlog details.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
connectorConfig
-
binaryLogClientConfigurator
-
-
Constructor Details
-
MySqlConnectorAdapter
-
-
Method Details
-
createConnection
- Specified by:
createConnection
in interfaceConnectorAdapter
-
getBinaryLogClientConfigurator
- Specified by:
getBinaryLogClientConfigurator
in interfaceConnectorAdapter
-
setOffsetContextBinlogPositionAndGtidDetailsForSnapshot
public void setOffsetContextBinlogPositionAndGtidDetailsForSnapshot(MySqlOffsetContext offsetContext, AbstractConnectorConnection connection) throws Exception Description copied from interface:ConnectorAdapter
Sets the offset context binlog details.- Specified by:
setOffsetContextBinlogPositionAndGtidDetailsForSnapshot
in interfaceConnectorAdapter
- Parameters:
offsetContext
- the offset context to be mutatedconnection
- the database connection to be used- Throws:
Exception
- if an exception is thrown
-
getJavaEncodingForCharSet
- Specified by:
getJavaEncodingForCharSet
in interfaceConnectorAdapter
-
getRecordingQueryFromEvent
- Specified by:
getRecordingQueryFromEvent
in interfaceConnectorAdapter
-
getHistoryRecordComparator
- Specified by:
getHistoryRecordComparator
in interfaceConnectorAdapter
-
getIncrementalSnapshotContext
- Specified by:
getIncrementalSnapshotContext
in interfaceConnectorAdapter
-
loadIncrementalSnapshotContextFromOffset
public <T> IncrementalSnapshotContext<T> loadIncrementalSnapshotContextFromOffset(Map<String, ?> offset) - Specified by:
loadIncrementalSnapshotContextFromOffset
in interfaceConnectorAdapter
-
getReadOnlyIncrementalSnapshotSignalOffset
- Specified by:
getReadOnlyIncrementalSnapshotSignalOffset
in interfaceConnectorAdapter
-
createIncrementalSnapshotChangeEventSource
public IncrementalSnapshotChangeEventSource<MySqlPartition,? extends io.debezium.spi.schema.DataCollectionId> createIncrementalSnapshotChangeEventSource(MySqlConnectorConfig connectorConfig, AbstractConnectorConnection connection, EventDispatcher<MySqlPartition, ? extends io.debezium.spi.schema.DataCollectionId> dispatcher, MySqlDatabaseSchema schema, Clock clock, SnapshotProgressListener<MySqlPartition> snapshotProgressListener, DataChangeEventListener<MySqlPartition> dataChangeEventListener, NotificationService<MySqlPartition, MySqlOffsetContext> notificationService) - Specified by:
createIncrementalSnapshotChangeEventSource
in interfaceConnectorAdapter
-
resolveFieldReader
-