DRAFT! WIP! DBZ-7996 Add AbstractChangeEventSink with shared logic for JDBC sink and MongoDB sink connectors#5918
Conversation
|
@jpechane A bit late, but for a first look here's my PR including all changes so far. JDBC sink connector is using the old logic (can be switched to new one using It is missing the final Buffer and Batch logic (not yet finished). |
27b5d89 to
f0d3474
Compare
cde20c7 to
2d5c240
Compare
…and MongoDB sink connectors closes to https://issues.redhat.com/browse/DBZ-7996
2d5c240 to
49cfed9
Compare
…and MongoDB sink connectors closes to https://issues.redhat.com/browse/DBZ-7996
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| public class LinkedHashMapExtractor { |
There was a problem hiding this comment.
Do we need a new class? I think it can go into io.debezium.util.Collect.
|
|
||
| public Optional<CollectionId> getCollectionId(String collectionName) { | ||
| return Optional.of(new CollectionId(collectionName)); | ||
| public CollectionId getCollectionId(String collectionName) { |
There was a problem hiding this comment.
Why the change from Optional? I amnot against it I' like to know the motivation.
|
|
||
| protected final SinkRecord originalKafkaRecord; | ||
|
|
||
| private final Object key; |
There was a problem hiding this comment.
Is this attrubute used anywhere?
| public abstract class AbstractBuffer implements Buffer { | ||
|
|
||
| protected final Map<CollectionId, LinkedHashMap<Object, DebeziumSinkRecord>> records = new LinkedHashMap<>(); | ||
| protected final LinkedHashMap<Object, DebeziumSinkRecord> records = new LinkedHashMap<>(); |
There was a problem hiding this comment.
Maybe it is possible to use java.util.SequencedMap in the decalration here and in other parts of the code?
|
❌ Developer Certificate of Origin (DCO) check failed. Hi @rk3rn3r, please sign off all commits with: If pull request commits are not signed off, the pull request cannot be merged. For more information about why this is required, please see our blog about contribution requirement changes. |
closes to https://issues.redhat.com/browse/DBZ-7996