-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
renamed SingleStoreDB -> SingleStore
- Loading branch information
Adalbert Makarovych
committed
Jan 31, 2024
1 parent
0e842db
commit 1be920c
Showing
46 changed files
with
719 additions
and
719 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/java/com/singlestore/debezium/SingleStoreChangeEventSourceFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.singlestore.debezium; | ||
|
||
import io.debezium.jdbc.MainConnectionProvidingConnectionFactory; | ||
import io.debezium.pipeline.ErrorHandler; | ||
import io.debezium.pipeline.EventDispatcher; | ||
import io.debezium.pipeline.notification.NotificationService; | ||
import io.debezium.pipeline.source.spi.ChangeEventSourceFactory; | ||
import io.debezium.pipeline.source.spi.SnapshotChangeEventSource; | ||
import io.debezium.pipeline.source.spi.SnapshotProgressListener; | ||
import io.debezium.pipeline.source.spi.StreamingChangeEventSource; | ||
import io.debezium.relational.TableId; | ||
import io.debezium.util.Clock; | ||
|
||
public class SingleStoreChangeEventSourceFactory implements ChangeEventSourceFactory<SingleStorePartition, SingleStoreOffsetContext> { | ||
|
||
SingleStoreConnectorConfig connectorConfig; | ||
MainConnectionProvidingConnectionFactory<SingleStoreConnection> connectionFactory; | ||
SingleStoreDatabaseSchema schema; | ||
EventDispatcher<SingleStorePartition, TableId> dispatcher; | ||
ErrorHandler errorHandler; | ||
Clock clock; | ||
|
||
public SingleStoreChangeEventSourceFactory(SingleStoreConnectorConfig connectorConfig, | ||
MainConnectionProvidingConnectionFactory<SingleStoreConnection> connectionFactory, | ||
SingleStoreDatabaseSchema schema, | ||
EventDispatcher<SingleStorePartition, TableId> dispatcher, | ||
ErrorHandler errorHandler, | ||
Clock clock) { | ||
this.connectorConfig = connectorConfig; | ||
this.connectionFactory = connectionFactory; | ||
this.schema = schema; | ||
this.dispatcher = dispatcher; | ||
this.errorHandler = errorHandler; | ||
this.clock = clock; | ||
} | ||
|
||
@Override | ||
public SnapshotChangeEventSource<SingleStorePartition, SingleStoreOffsetContext> getSnapshotChangeEventSource( | ||
SnapshotProgressListener<SingleStorePartition> snapshotProgressListener, | ||
NotificationService<SingleStorePartition, SingleStoreOffsetContext> notificationService) { | ||
return new SingleStoreSnapshotChangeEventSource(connectorConfig, connectionFactory, schema, dispatcher, clock, snapshotProgressListener, notificationService); | ||
} | ||
|
||
@Override | ||
public StreamingChangeEventSource<SingleStorePartition, SingleStoreOffsetContext> getStreamingChangeEventSource() { | ||
return new SingleStoreStreamingChangeEventSource(connectorConfig, connectionFactory.mainConnection(), dispatcher, errorHandler, schema, clock); | ||
} | ||
|
||
// TODO incremental snapshot | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.