OmniaGM commented on code in PR #15999:
URL: https://github.com/apache/kafka/pull/15999#discussion_r1639978395
##########
connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorCheckpointConfig.java:
##########
@@ -166,6 +169,34 @@ Duration consumerPollTimeout() {
return Duration.ofMillis(getLong(CONSUMER_POLL_TIMEOUT_MILLIS));
}
+ public List<ConfigValue> validate() {
+ Boolean emitCheckpointsValue =
this.getBoolean(EMIT_CHECKPOINTS_ENABLED);
+ Boolean syncGroupOffsetsValue =
this.getBoolean(SYNC_GROUP_OFFSETS_ENABLED);
+
+ List<ConfigValue> invalidConfigs = new ArrayList<>();
+ if (!emitCheckpointsValue && !syncGroupOffsetsValue) {
+ ConfigValue syncGroupOffsets = new
ConfigValue(SYNC_GROUP_OFFSETS_ENABLED);
+ ConfigValue emitCheckpoints = new
ConfigValue(EMIT_CHECKPOINTS_ENABLED);
+
+ String errorMessage = "MirrorCheckpointConnector can't run without
both" + SYNC_GROUP_OFFSETS_ENABLED + ", " +
Review Comment:
I couldn't find a way to report warning on configs that doesn't make sense.
Technically we can run the checkpoint connector without these features and if
user later enabled these the connector would be fine. The down side is users
might not notice that this connector is actually sitting idle.
I can convert this methods to just return boolean and log some warnings
instead of failing the connector
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]