Package io.debezium.connector.mariadb
Class MariaDbStreamingChangeEventSource
java.lang.Object
io.debezium.connector.binlog.BinlogStreamingChangeEventSource<MariaDbPartition,MariaDbOffsetContext>
io.debezium.connector.mariadb.MariaDbStreamingChangeEventSource
- All Implemented Interfaces:
io.debezium.pipeline.source.spi.ChangeEventSource,io.debezium.pipeline.source.spi.StreamingChangeEventSource<MariaDbPartition,MariaDbOffsetContext>
public class MariaDbStreamingChangeEventSource
extends BinlogStreamingChangeEventSource<MariaDbPartition,MariaDbOffsetContext>
- Author:
- Chris Cranford
-
Nested Class Summary
Nested classes/interfaces inherited from class io.debezium.connector.binlog.BinlogStreamingChangeEventSource
BinlogStreamingChangeEventSource.BinlogPosition, BinlogStreamingChangeEventSource.ReaderThreadLifecycleListenerNested classes/interfaces inherited from interface io.debezium.pipeline.source.spi.ChangeEventSource
io.debezium.pipeline.source.spi.ChangeEventSource.ChangeEventSourceContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MariaDbConnectorConfigprivate com.github.shyiko.mysql.binlog.MariadbGtidSetprivate static final org.slf4j.Loggerprivate final io.debezium.relational.TableIdFields inherited from class io.debezium.connector.binlog.BinlogStreamingChangeEventSource
eventTimestamp -
Constructor Summary
ConstructorsConstructorDescriptionMariaDbStreamingChangeEventSource(MariaDbConnectorConfig connectorConfig, BinlogConnectorConnection connection, io.debezium.pipeline.EventDispatcher<MariaDbPartition, io.debezium.relational.TableId> dispatcher, io.debezium.pipeline.ErrorHandler errorHandler, io.debezium.util.Clock clock, MariaDbTaskContext taskContext, MariaDbStreamingChangeEventSourceMetrics metrics, io.debezium.snapshot.SnapshotterService snapshotterService) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureReplicaCompatibility(com.github.shyiko.mysql.binlog.BinaryLogClient client) protected com.github.shyiko.mysql.binlog.BinaryLogClientcreateBinaryLogClient(BinlogTaskContext<?> taskContext, BinlogConnectorConfig connectorConfig, Map<String, Thread> clientThreads, BinlogConnectorConnection connection) protected Class<? extends org.apache.kafka.connect.source.SourceConnector>protected com.github.shyiko.mysql.binlog.event.EventTypeprotected com.github.shyiko.mysql.binlog.event.EventTypeprivate static io.debezium.relational.TableIdgetSignalDataCollectionId(MariaDbConnectorConfig connectorConfig) protected voidhandleGtidEvent(MariaDbPartition partition, MariaDbOffsetContext offsetContext, com.github.shyiko.mysql.binlog.event.Event event, Predicate<String> gtidDmlSourceFilter) protected voidhandleRecordingQuery(MariaDbOffsetContext offsetContext, com.github.shyiko.mysql.binlog.event.Event event) voidinit(MariaDbOffsetContext offsetContext) protected voidinitializeGtidSet(String value) protected voidsetEventTimestamp(com.github.shyiko.mysql.binlog.event.Event event, long eventTs) Methods inherited from class io.debezium.connector.binlog.BinlogStreamingChangeEventSource
createEventDeserializer, execute, getOffsetContext, handleDelete, handleEvent, handleInsert, handleQueryEvent, handleRotateLogsEvent, handleServerHeartbeat, handleServerIncident, handleServerStop, handleTransactionBegin, handleTransactionPayload, handleUpdate, handleUpdateTableMetadata, ignoreEvent, isGtidModeEnabled, logEvent, onEvent, prepareTransaction, setEffectiveOffsetContext, setGtidChanged, setIgnoreDmlEventByGtidSource, unwrapData, viewChange, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.pipeline.source.spi.StreamingChangeEventSource
commitOffset, executeIteration
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
connectorConfig
-
signalDataCollectionId
private final io.debezium.relational.TableId signalDataCollectionId -
gtidSet
private com.github.shyiko.mysql.binlog.MariadbGtidSet gtidSet
-
-
Constructor Details
-
MariaDbStreamingChangeEventSource
public MariaDbStreamingChangeEventSource(MariaDbConnectorConfig connectorConfig, BinlogConnectorConnection connection, io.debezium.pipeline.EventDispatcher<MariaDbPartition, io.debezium.relational.TableId> dispatcher, io.debezium.pipeline.ErrorHandler errorHandler, io.debezium.util.Clock clock, MariaDbTaskContext taskContext, MariaDbStreamingChangeEventSourceMetrics metrics, io.debezium.snapshot.SnapshotterService snapshotterService)
-
-
Method Details
-
init
-
getConnectorClass
- Specified by:
getConnectorClassin classBinlogStreamingChangeEventSource<MariaDbPartition,MariaDbOffsetContext>
-
createBinaryLogClient
protected com.github.shyiko.mysql.binlog.BinaryLogClient createBinaryLogClient(BinlogTaskContext<?> taskContext, BinlogConnectorConfig connectorConfig, Map<String, Thread> clientThreads, BinlogConnectorConnection connection) - Overrides:
createBinaryLogClientin classBinlogStreamingChangeEventSource<MariaDbPartition,MariaDbOffsetContext>
-
configureReplicaCompatibility
protected void configureReplicaCompatibility(com.github.shyiko.mysql.binlog.BinaryLogClient client) -
setEventTimestamp
protected void setEventTimestamp(com.github.shyiko.mysql.binlog.event.Event event, long eventTs) - Specified by:
setEventTimestampin classBinlogStreamingChangeEventSource<MariaDbPartition,MariaDbOffsetContext>
-
handleGtidEvent
protected void handleGtidEvent(MariaDbPartition partition, MariaDbOffsetContext offsetContext, com.github.shyiko.mysql.binlog.event.Event event, Predicate<String> gtidDmlSourceFilter) throws InterruptedException - Specified by:
handleGtidEventin classBinlogStreamingChangeEventSource<MariaDbPartition,MariaDbOffsetContext> - Throws:
InterruptedException
-
handleRecordingQuery
protected void handleRecordingQuery(MariaDbOffsetContext offsetContext, com.github.shyiko.mysql.binlog.event.Event event) - Specified by:
handleRecordingQueryin classBinlogStreamingChangeEventSource<MariaDbPartition,MariaDbOffsetContext>
-
getIncludeQueryEventType
protected com.github.shyiko.mysql.binlog.event.EventType getIncludeQueryEventType()- Specified by:
getIncludeQueryEventTypein classBinlogStreamingChangeEventSource<MariaDbPartition,MariaDbOffsetContext>
-
getGtidEventType
protected com.github.shyiko.mysql.binlog.event.EventType getGtidEventType()- Specified by:
getGtidEventTypein classBinlogStreamingChangeEventSource<MariaDbPartition,MariaDbOffsetContext>
-
initializeGtidSet
- Specified by:
initializeGtidSetin classBinlogStreamingChangeEventSource<MariaDbPartition,MariaDbOffsetContext>
-
getSignalDataCollectionId
private static io.debezium.relational.TableId getSignalDataCollectionId(MariaDbConnectorConfig connectorConfig)
-