DBZ#1668 Add descriptors generation to Debezium Server sinks#257
DBZ#1668 Add descriptors generation to Debezium Server sinks#257mfvitale merged 8 commits intodebezium:mainfrom
Conversation
|
Just a draft to see if we like going in this direction. I would like to mainly receive feedback on the The idea is also to easily share common code like validation and configurations of Debezium Server sink so that them can be just reused elsewhere (i.e Debezium Platform). @jpechane @Naros @kmos @rk3rn3r I really appreciate your feedback on this. |
|
@mfvitale I wonder if |
My main idea here is to have a single
We can also think to add the validation. So thinking also to the upcoming migration to I will also let @kmos add his bits in this regards. In any case the part relevant for the scope of this PR is the ones related to component descriptors
the rest could be just a draft and discussed in a dedicated issue, just to avoid blocking the component descriptors for sinks. |
Exactly. As @mfvitale mentioned, in the first iteration we can migrate to QDE by capturing the |
|
Failure addressed with #262 @jpechane @Naros Could you take a final look to? I would just add Ideally I would like to have the changes to the consumers merged before the |
| configuredPartitionId = (config.getConfiguredPartitionId() != null) ? config.getConfiguredPartitionId() : ""; | ||
| configuredPartitionKey = (config.getConfiguredPartitionKey() != null) ? config.getConfiguredPartitionKey() : ""; |
There was a problem hiding this comment.
Could we use Strings.defaultIfEmpty for these types of cases?
|
|
||
| final String serverHost = config.getServerHost(); | ||
| final String cacheName = config.getCacheName(); | ||
| final Integer serverPort = config.getServerPort() != null ? config.getServerPort() : ConfigurationProperties.DEFAULT_HOTROD_PORT; |
There was a problem hiding this comment.
For situations like this, would it make sense to abstract this detail away inside the various sink-specific configuration class so for this call site it would simply be config.getServerPort() ? We could probably extend this to a variety of other places and minimize redundancy.
There was a problem hiding this comment.
Or a helper method so it will be like Util.defaultWhenNull(config.getServerPort(),ConfigurationProperties.DEFAULT_HOTROD_PORT)
There was a problem hiding this comment.
Well since we use the io.debezium.config.Configuration inside the configuration classes we can use it to get the defaults and or properly set default on Field
There was a problem hiding this comment.
@mfvitale Good point! This should be added in all places but I am fine doing that kind of cleanup in a separate PR.
Signed-off-by: Fiore Mario Vitale <mvitale@redhat.com>
Signed-off-by: Fiore Mario Vitale <mvitale@redhat.com>
Signed-off-by: Fiore Mario Vitale <mvitale@redhat.com>
Signed-off-by: Fiore Mario Vitale <mvitale@redhat.com>
Signed-off-by: Fiore Mario Vitale <mvitale@redhat.com>
Signed-off-by: Fiore Mario Vitale <mvitale@redhat.com>
Signed-off-by: Fiore Mario Vitale <mvitale@redhat.com>
Signed-off-by: Fiore Mario Vitale <mvitale@redhat.com>
closes: debezium/dbz#1668
requires: debezium/debezium#7274