diff --git a/build.gradle b/build.gradle index 56cecbe7ae678..4b2c88bf3c410 100644 --- a/build.gradle +++ b/build.gradle @@ -1063,7 +1063,7 @@ project(':core') { ':streams:genStreamsConfigDocs', 'genConsumerMetricsDocs', 'genProducerMetricsDocs', ':connect:runtime:genConnectMetricsDocs', ':connect:runtime:genConnectOpenAPIDocs', ':connect:mirror:genMirrorSourceConfigDocs', ':connect:mirror:genMirrorCheckpointConfigDocs', - ':connect:mirror:genMirrorHeartbeatConfigDocs'], type: Tar) { + ':connect:mirror:genMirrorHeartbeatConfigDocs', ':connect:mirror:genMirrorConnectorConfigDocs'], type: Tar) { archiveClassifier = 'site-docs' compression = Compression.GZIP from project.file("$rootDir/docs") @@ -2985,6 +2985,13 @@ project(':connect:mirror') { duplicatesStrategy 'exclude' } + task genMirrorConnectorConfigDocs(type: JavaExec) { + classpath = sourceSets.main.runtimeClasspath + mainClass = 'org.apache.kafka.connect.mirror.MirrorConnectorConfig' + if( !generatedDocsDir.exists() ) { generatedDocsDir.mkdirs() } + standardOutput = new File(generatedDocsDir, "mirror_connector_config.html").newOutputStream() + } + task genMirrorSourceConfigDocs(type: JavaExec) { classpath = sourceSets.main.runtimeClasspath mainClass = 'org.apache.kafka.connect.mirror.MirrorSourceConfig' diff --git a/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorCheckpointConfig.java b/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorCheckpointConfig.java index bed71ff0db2db..e37cee4a79b8b 100644 --- a/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorCheckpointConfig.java +++ b/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorCheckpointConfig.java @@ -165,94 +165,98 @@ Duration consumerPollTimeout() { return Duration.ofMillis(getLong(CONSUMER_POLL_TIMEOUT_MILLIS)); } - protected static final ConfigDef CONNECTOR_CONFIG_DEF = new ConfigDef(BASE_CONNECTOR_CONFIG_DEF) - .define( - CONSUMER_POLL_TIMEOUT_MILLIS, - ConfigDef.Type.LONG, - CONSUMER_POLL_TIMEOUT_MILLIS_DEFAULT, - ConfigDef.Importance.LOW, - CONSUMER_POLL_TIMEOUT_MILLIS_DOC) - .define( - GROUPS, - ConfigDef.Type.LIST, - GROUPS_DEFAULT, - ConfigDef.Importance.HIGH, - GROUPS_DOC) - .define( - GROUPS_EXCLUDE, - ConfigDef.Type.LIST, - GROUPS_EXCLUDE_DEFAULT, - ConfigDef.Importance.HIGH, - GROUPS_EXCLUDE_DOC) - .define( - GROUPS_EXCLUDE_ALIAS, - ConfigDef.Type.LIST, - null, - ConfigDef.Importance.HIGH, - "Deprecated. Use " + GROUPS_EXCLUDE + " instead.") - .define( - GROUP_FILTER_CLASS, - ConfigDef.Type.CLASS, - GROUP_FILTER_CLASS_DEFAULT, - ConfigDef.Importance.LOW, - GROUP_FILTER_CLASS_DOC) - .define( - REFRESH_GROUPS_ENABLED, - ConfigDef.Type.BOOLEAN, - REFRESH_GROUPS_ENABLED_DEFAULT, - ConfigDef.Importance.LOW, - REFRESH_GROUPS_ENABLED_DOC) - .define( - REFRESH_GROUPS_INTERVAL_SECONDS, - ConfigDef.Type.LONG, - REFRESH_GROUPS_INTERVAL_SECONDS_DEFAULT, - ConfigDef.Importance.LOW, - REFRESH_GROUPS_INTERVAL_SECONDS_DOC) - .define( - EMIT_CHECKPOINTS_ENABLED, - ConfigDef.Type.BOOLEAN, - EMIT_CHECKPOINTS_ENABLED_DEFAULT, - ConfigDef.Importance.LOW, - EMIT_CHECKPOINTS_ENABLED_DOC) - .define( - EMIT_CHECKPOINTS_INTERVAL_SECONDS, - ConfigDef.Type.LONG, - EMIT_CHECKPOINTS_INTERVAL_SECONDS_DEFAULT, - ConfigDef.Importance.LOW, - EMIT_CHECKPOINTS_INTERVAL_SECONDS_DOC) - .define( - SYNC_GROUP_OFFSETS_ENABLED, - ConfigDef.Type.BOOLEAN, - SYNC_GROUP_OFFSETS_ENABLED_DEFAULT, - ConfigDef.Importance.LOW, - SYNC_GROUP_OFFSETS_ENABLED_DOC) - .define( - SYNC_GROUP_OFFSETS_INTERVAL_SECONDS, - ConfigDef.Type.LONG, - SYNC_GROUP_OFFSETS_INTERVAL_SECONDS_DEFAULT, - ConfigDef.Importance.LOW, - SYNC_GROUP_OFFSETS_INTERVAL_SECONDS_DOC) - .define( - CHECKPOINTS_TOPIC_REPLICATION_FACTOR, - ConfigDef.Type.SHORT, - CHECKPOINTS_TOPIC_REPLICATION_FACTOR_DEFAULT, - ConfigDef.Importance.LOW, - CHECKPOINTS_TOPIC_REPLICATION_FACTOR_DOC) - .define( - OFFSET_SYNCS_TOPIC_LOCATION, - ConfigDef.Type.STRING, - OFFSET_SYNCS_TOPIC_LOCATION_DEFAULT, - ConfigDef.ValidString.in(SOURCE_CLUSTER_ALIAS_DEFAULT, TARGET_CLUSTER_ALIAS_DEFAULT), - ConfigDef.Importance.LOW, - OFFSET_SYNCS_TOPIC_LOCATION_DOC) - .define( - TOPIC_FILTER_CLASS, - ConfigDef.Type.CLASS, - TOPIC_FILTER_CLASS_DEFAULT, - ConfigDef.Importance.LOW, - TOPIC_FILTER_CLASS_DOC); + private static ConfigDef defineCheckpointConfig(ConfigDef baseConfig) { + return baseConfig + .define( + CONSUMER_POLL_TIMEOUT_MILLIS, + ConfigDef.Type.LONG, + CONSUMER_POLL_TIMEOUT_MILLIS_DEFAULT, + ConfigDef.Importance.LOW, + CONSUMER_POLL_TIMEOUT_MILLIS_DOC) + .define( + GROUPS, + ConfigDef.Type.LIST, + GROUPS_DEFAULT, + ConfigDef.Importance.HIGH, + GROUPS_DOC) + .define( + GROUPS_EXCLUDE, + ConfigDef.Type.LIST, + GROUPS_EXCLUDE_DEFAULT, + ConfigDef.Importance.HIGH, + GROUPS_EXCLUDE_DOC) + .define( + GROUPS_EXCLUDE_ALIAS, + ConfigDef.Type.LIST, + null, + ConfigDef.Importance.HIGH, + "Deprecated. Use " + GROUPS_EXCLUDE + " instead.") + .define( + GROUP_FILTER_CLASS, + ConfigDef.Type.CLASS, + GROUP_FILTER_CLASS_DEFAULT, + ConfigDef.Importance.LOW, + GROUP_FILTER_CLASS_DOC) + .define( + REFRESH_GROUPS_ENABLED, + ConfigDef.Type.BOOLEAN, + REFRESH_GROUPS_ENABLED_DEFAULT, + ConfigDef.Importance.LOW, + REFRESH_GROUPS_ENABLED_DOC) + .define( + REFRESH_GROUPS_INTERVAL_SECONDS, + ConfigDef.Type.LONG, + REFRESH_GROUPS_INTERVAL_SECONDS_DEFAULT, + ConfigDef.Importance.LOW, + REFRESH_GROUPS_INTERVAL_SECONDS_DOC) + .define( + EMIT_CHECKPOINTS_ENABLED, + ConfigDef.Type.BOOLEAN, + EMIT_CHECKPOINTS_ENABLED_DEFAULT, + ConfigDef.Importance.LOW, + EMIT_CHECKPOINTS_ENABLED_DOC) + .define( + EMIT_CHECKPOINTS_INTERVAL_SECONDS, + ConfigDef.Type.LONG, + EMIT_CHECKPOINTS_INTERVAL_SECONDS_DEFAULT, + ConfigDef.Importance.LOW, + EMIT_CHECKPOINTS_INTERVAL_SECONDS_DOC) + .define( + SYNC_GROUP_OFFSETS_ENABLED, + ConfigDef.Type.BOOLEAN, + SYNC_GROUP_OFFSETS_ENABLED_DEFAULT, + ConfigDef.Importance.LOW, + SYNC_GROUP_OFFSETS_ENABLED_DOC) + .define( + SYNC_GROUP_OFFSETS_INTERVAL_SECONDS, + ConfigDef.Type.LONG, + SYNC_GROUP_OFFSETS_INTERVAL_SECONDS_DEFAULT, + ConfigDef.Importance.LOW, + SYNC_GROUP_OFFSETS_INTERVAL_SECONDS_DOC) + .define( + CHECKPOINTS_TOPIC_REPLICATION_FACTOR, + ConfigDef.Type.SHORT, + CHECKPOINTS_TOPIC_REPLICATION_FACTOR_DEFAULT, + ConfigDef.Importance.LOW, + CHECKPOINTS_TOPIC_REPLICATION_FACTOR_DOC) + .define( + OFFSET_SYNCS_TOPIC_LOCATION, + ConfigDef.Type.STRING, + OFFSET_SYNCS_TOPIC_LOCATION_DEFAULT, + ConfigDef.ValidString.in(SOURCE_CLUSTER_ALIAS_DEFAULT, TARGET_CLUSTER_ALIAS_DEFAULT), + ConfigDef.Importance.LOW, + OFFSET_SYNCS_TOPIC_LOCATION_DOC) + .define( + TOPIC_FILTER_CLASS, + ConfigDef.Type.CLASS, + TOPIC_FILTER_CLASS_DEFAULT, + ConfigDef.Importance.LOW, + TOPIC_FILTER_CLASS_DOC); + } + + protected final static ConfigDef CONNECTOR_CONFIG_DEF = defineCheckpointConfig(new ConfigDef(BASE_CONNECTOR_CONFIG_DEF)); public static void main(String[] args) { - System.out.println(CONNECTOR_CONFIG_DEF.toHtml(4, config -> "mirror_checkpoint_" + config)); + System.out.println(defineCheckpointConfig(new ConfigDef()).toHtml(4, config -> "mirror_checkpoint_" + config)); } } diff --git a/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorConnectorConfig.java b/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorConnectorConfig.java index 2df67074878b1..57763d7233a73 100644 --- a/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorConnectorConfig.java +++ b/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorConnectorConfig.java @@ -306,4 +306,8 @@ String entityLabel() { ) .withClientSslSupport() .withClientSaslSupport(); + + public static void main(String[] args) { + System.out.println(BASE_CONNECTOR_CONFIG_DEF.toHtml(4, config -> "mirror_connector_" + config)); + } } diff --git a/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorHeartbeatConfig.java b/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorHeartbeatConfig.java index a6b2e36d34cc6..4cdc37ea1219d 100644 --- a/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorHeartbeatConfig.java +++ b/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorHeartbeatConfig.java @@ -57,27 +57,31 @@ short heartbeatsTopicReplicationFactor() { return getShort(HEARTBEATS_TOPIC_REPLICATION_FACTOR); } - protected static final ConfigDef CONNECTOR_CONFIG_DEF = new ConfigDef(BASE_CONNECTOR_CONFIG_DEF) - .define( + private static ConfigDef defineHeartbeatConfig(ConfigDef baseConfig) { + return baseConfig + .define( EMIT_HEARTBEATS_ENABLED, ConfigDef.Type.BOOLEAN, EMIT_HEARTBEATS_ENABLED_DEFAULT, ConfigDef.Importance.LOW, EMIT_HEARTBEATS_ENABLED_DOC) - .define( + .define( EMIT_HEARTBEATS_INTERVAL_SECONDS, ConfigDef.Type.LONG, EMIT_HEARTBEATS_INTERVAL_SECONDS_DEFAULT, ConfigDef.Importance.LOW, EMIT_HEARTBEATS_INTERVAL_SECONDS_DOC) - .define( + .define( HEARTBEATS_TOPIC_REPLICATION_FACTOR, ConfigDef.Type.SHORT, HEARTBEATS_TOPIC_REPLICATION_FACTOR_DEFAULT, ConfigDef.Importance.LOW, HEARTBEATS_TOPIC_REPLICATION_FACTOR_DOC); + } + + protected final static ConfigDef CONNECTOR_CONFIG_DEF = defineHeartbeatConfig(new ConfigDef(BASE_CONNECTOR_CONFIG_DEF)); public static void main(String[] args) { - System.out.println(CONNECTOR_CONFIG_DEF.toHtml(4, config -> "mirror_heartbeat_" + config)); + System.out.println(defineHeartbeatConfig(new ConfigDef()).toHtml(4, config -> "mirror_heartbeat_" + config)); } } diff --git a/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceConfig.java b/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceConfig.java index ff176f5be7ef5..f9368cb7e19c5 100644 --- a/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceConfig.java +++ b/connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceConfig.java @@ -220,131 +220,135 @@ boolean addSourceAliasToMetrics() { return getBoolean(ADD_SOURCE_ALIAS_TO_METRICS); } - protected static final ConfigDef CONNECTOR_CONFIG_DEF = new ConfigDef(BASE_CONNECTOR_CONFIG_DEF) - .define( - TOPICS, - ConfigDef.Type.LIST, - TOPICS_DEFAULT, - ConfigDef.Importance.HIGH, - TOPICS_DOC) - .define( - TOPICS_EXCLUDE, - ConfigDef.Type.LIST, - TOPICS_EXCLUDE_DEFAULT, - ConfigDef.Importance.HIGH, - TOPICS_EXCLUDE_DOC) - .define( - TOPICS_EXCLUDE_ALIAS, - ConfigDef.Type.LIST, - null, - ConfigDef.Importance.HIGH, - "Deprecated. Use " + TOPICS_EXCLUDE + " instead.") - .define( - CONFIG_PROPERTIES_EXCLUDE, - ConfigDef.Type.LIST, - CONFIG_PROPERTIES_EXCLUDE_DEFAULT, - ConfigDef.Importance.HIGH, - CONFIG_PROPERTIES_EXCLUDE_DOC) - .define( - CONFIG_PROPERTIES_EXCLUDE_ALIAS, - ConfigDef.Type.LIST, - null, - ConfigDef.Importance.HIGH, - "Deprecated. Use " + CONFIG_PROPERTIES_EXCLUDE + " instead.") - .define( - TOPIC_FILTER_CLASS, - ConfigDef.Type.CLASS, - TOPIC_FILTER_CLASS_DEFAULT, - ConfigDef.Importance.LOW, - TOPIC_FILTER_CLASS_DOC) - .define( - CONFIG_PROPERTY_FILTER_CLASS, - ConfigDef.Type.CLASS, - CONFIG_PROPERTY_FILTER_CLASS_DEFAULT, - ConfigDef.Importance.LOW, - CONFIG_PROPERTY_FILTER_CLASS_DOC) - .define( - CONSUMER_POLL_TIMEOUT_MILLIS, - ConfigDef.Type.LONG, - CONSUMER_POLL_TIMEOUT_MILLIS_DEFAULT, - ConfigDef.Importance.LOW, - CONSUMER_POLL_TIMEOUT_MILLIS_DOC) - .define( - REFRESH_TOPICS_ENABLED, - ConfigDef.Type.BOOLEAN, - REFRESH_TOPICS_ENABLED_DEFAULT, - ConfigDef.Importance.LOW, - REFRESH_TOPICS_ENABLED_DOC) - .define( - REFRESH_TOPICS_INTERVAL_SECONDS, - ConfigDef.Type.LONG, - REFRESH_TOPICS_INTERVAL_SECONDS_DEFAULT, - ConfigDef.Importance.LOW, - REFRESH_TOPICS_INTERVAL_SECONDS_DOC) - .define( - SYNC_TOPIC_CONFIGS_ENABLED, - ConfigDef.Type.BOOLEAN, - SYNC_TOPIC_CONFIGS_ENABLED_DEFAULT, - ConfigDef.Importance.LOW, - SYNC_TOPIC_CONFIGS_ENABLED_DOC) - .define( - SYNC_TOPIC_CONFIGS_INTERVAL_SECONDS, - ConfigDef.Type.LONG, - SYNC_TOPIC_CONFIGS_INTERVAL_SECONDS_DEFAULT, - ConfigDef.Importance.LOW, - SYNC_TOPIC_CONFIGS_INTERVAL_SECONDS_DOC) - .define( - USE_INCREMENTAL_ALTER_CONFIGS, - ConfigDef.Type.STRING, - REQUEST_INCREMENTAL_ALTER_CONFIGS, - in(REQUEST_INCREMENTAL_ALTER_CONFIGS, REQUIRE_INCREMENTAL_ALTER_CONFIGS, NEVER_USE_INCREMENTAL_ALTER_CONFIGS), - ConfigDef.Importance.LOW, - USE_INCREMENTAL_ALTER_CONFIG_DOC) - .define( - SYNC_TOPIC_ACLS_ENABLED, - ConfigDef.Type.BOOLEAN, - SYNC_TOPIC_ACLS_ENABLED_DEFAULT, - ConfigDef.Importance.LOW, - SYNC_TOPIC_ACLS_ENABLED_DOC) - .define( - SYNC_TOPIC_ACLS_INTERVAL_SECONDS, - ConfigDef.Type.LONG, - SYNC_TOPIC_ACLS_INTERVAL_SECONDS_DEFAULT, - ConfigDef.Importance.LOW, - SYNC_TOPIC_ACLS_INTERVAL_SECONDS_DOC) - .define( - REPLICATION_FACTOR, - ConfigDef.Type.INT, - REPLICATION_FACTOR_DEFAULT, - ConfigDef.Importance.LOW, - REPLICATION_FACTOR_DOC) - .define( - OFFSET_SYNCS_TOPIC_REPLICATION_FACTOR, - ConfigDef.Type.SHORT, - OFFSET_SYNCS_TOPIC_REPLICATION_FACTOR_DEFAULT, - ConfigDef.Importance.LOW, - OFFSET_SYNCS_TOPIC_REPLICATION_FACTOR_DOC) - .define( - OFFSET_LAG_MAX, - ConfigDef.Type.LONG, - OFFSET_LAG_MAX_DEFAULT, - ConfigDef.Importance.LOW, - OFFSET_LAG_MAX_DOC) - .define( - OFFSET_SYNCS_TOPIC_LOCATION, - ConfigDef.Type.STRING, - OFFSET_SYNCS_TOPIC_LOCATION_DEFAULT, - in(SOURCE_CLUSTER_ALIAS_DEFAULT, TARGET_CLUSTER_ALIAS_DEFAULT), - ConfigDef.Importance.LOW, - OFFSET_SYNCS_TOPIC_LOCATION_DOC) - .define( - ADD_SOURCE_ALIAS_TO_METRICS, - ConfigDef.Type.BOOLEAN, - ADD_SOURCE_ALIAS_TO_METRICS_DEFAULT, - ConfigDef.Importance.LOW, - ADD_SOURCE_ALIAS_TO_METRICS_DOC); - - public static void main(String[] args) { - System.out.println(CONNECTOR_CONFIG_DEF.toHtml(4, config -> "mirror_source_" + config)); + private static ConfigDef defineSourceConfig(ConfigDef baseConfig) { + return baseConfig + .define( + TOPICS, + ConfigDef.Type.LIST, + TOPICS_DEFAULT, + ConfigDef.Importance.HIGH, + TOPICS_DOC) + .define( + TOPICS_EXCLUDE, + ConfigDef.Type.LIST, + TOPICS_EXCLUDE_DEFAULT, + ConfigDef.Importance.HIGH, + TOPICS_EXCLUDE_DOC) + .define( + TOPICS_EXCLUDE_ALIAS, + ConfigDef.Type.LIST, + null, + ConfigDef.Importance.HIGH, + "Deprecated. Use " + TOPICS_EXCLUDE + " instead.") + .define( + CONFIG_PROPERTIES_EXCLUDE, + ConfigDef.Type.LIST, + CONFIG_PROPERTIES_EXCLUDE_DEFAULT, + ConfigDef.Importance.HIGH, + CONFIG_PROPERTIES_EXCLUDE_DOC) + .define( + CONFIG_PROPERTIES_EXCLUDE_ALIAS, + ConfigDef.Type.LIST, + null, + ConfigDef.Importance.HIGH, + "Deprecated. Use " + CONFIG_PROPERTIES_EXCLUDE + " instead.") + .define( + TOPIC_FILTER_CLASS, + ConfigDef.Type.CLASS, + TOPIC_FILTER_CLASS_DEFAULT, + ConfigDef.Importance.LOW, + TOPIC_FILTER_CLASS_DOC) + .define( + CONFIG_PROPERTY_FILTER_CLASS, + ConfigDef.Type.CLASS, + CONFIG_PROPERTY_FILTER_CLASS_DEFAULT, + ConfigDef.Importance.LOW, + CONFIG_PROPERTY_FILTER_CLASS_DOC) + .define( + CONSUMER_POLL_TIMEOUT_MILLIS, + ConfigDef.Type.LONG, + CONSUMER_POLL_TIMEOUT_MILLIS_DEFAULT, + ConfigDef.Importance.LOW, + CONSUMER_POLL_TIMEOUT_MILLIS_DOC) + .define( + REFRESH_TOPICS_ENABLED, + ConfigDef.Type.BOOLEAN, + REFRESH_TOPICS_ENABLED_DEFAULT, + ConfigDef.Importance.LOW, + REFRESH_TOPICS_ENABLED_DOC) + .define( + REFRESH_TOPICS_INTERVAL_SECONDS, + ConfigDef.Type.LONG, + REFRESH_TOPICS_INTERVAL_SECONDS_DEFAULT, + ConfigDef.Importance.LOW, + REFRESH_TOPICS_INTERVAL_SECONDS_DOC) + .define( + SYNC_TOPIC_CONFIGS_ENABLED, + ConfigDef.Type.BOOLEAN, + SYNC_TOPIC_CONFIGS_ENABLED_DEFAULT, + ConfigDef.Importance.LOW, + SYNC_TOPIC_CONFIGS_ENABLED_DOC) + .define( + SYNC_TOPIC_CONFIGS_INTERVAL_SECONDS, + ConfigDef.Type.LONG, + SYNC_TOPIC_CONFIGS_INTERVAL_SECONDS_DEFAULT, + ConfigDef.Importance.LOW, + SYNC_TOPIC_CONFIGS_INTERVAL_SECONDS_DOC) + .define( + USE_INCREMENTAL_ALTER_CONFIGS, + ConfigDef.Type.STRING, + REQUEST_INCREMENTAL_ALTER_CONFIGS, + in(REQUEST_INCREMENTAL_ALTER_CONFIGS, REQUIRE_INCREMENTAL_ALTER_CONFIGS, NEVER_USE_INCREMENTAL_ALTER_CONFIGS), + ConfigDef.Importance.LOW, + USE_INCREMENTAL_ALTER_CONFIG_DOC) + .define( + SYNC_TOPIC_ACLS_ENABLED, + ConfigDef.Type.BOOLEAN, + SYNC_TOPIC_ACLS_ENABLED_DEFAULT, + ConfigDef.Importance.LOW, + SYNC_TOPIC_ACLS_ENABLED_DOC) + .define( + SYNC_TOPIC_ACLS_INTERVAL_SECONDS, + ConfigDef.Type.LONG, + SYNC_TOPIC_ACLS_INTERVAL_SECONDS_DEFAULT, + ConfigDef.Importance.LOW, + SYNC_TOPIC_ACLS_INTERVAL_SECONDS_DOC) + .define( + REPLICATION_FACTOR, + ConfigDef.Type.INT, + REPLICATION_FACTOR_DEFAULT, + ConfigDef.Importance.LOW, + REPLICATION_FACTOR_DOC) + .define( + OFFSET_SYNCS_TOPIC_REPLICATION_FACTOR, + ConfigDef.Type.SHORT, + OFFSET_SYNCS_TOPIC_REPLICATION_FACTOR_DEFAULT, + ConfigDef.Importance.LOW, + OFFSET_SYNCS_TOPIC_REPLICATION_FACTOR_DOC) + .define( + OFFSET_LAG_MAX, + ConfigDef.Type.LONG, + OFFSET_LAG_MAX_DEFAULT, + ConfigDef.Importance.LOW, + OFFSET_LAG_MAX_DOC) + .define( + OFFSET_SYNCS_TOPIC_LOCATION, + ConfigDef.Type.STRING, + OFFSET_SYNCS_TOPIC_LOCATION_DEFAULT, + in(SOURCE_CLUSTER_ALIAS_DEFAULT, TARGET_CLUSTER_ALIAS_DEFAULT), + ConfigDef.Importance.LOW, + OFFSET_SYNCS_TOPIC_LOCATION_DOC) + .define( + ADD_SOURCE_ALIAS_TO_METRICS, + ConfigDef.Type.BOOLEAN, + ADD_SOURCE_ALIAS_TO_METRICS_DEFAULT, + ConfigDef.Importance.LOW, + ADD_SOURCE_ALIAS_TO_METRICS_DOC); + } + + protected final static ConfigDef CONNECTOR_CONFIG_DEF = defineSourceConfig(new ConfigDef(BASE_CONNECTOR_CONFIG_DEF)); + + public static void main(String[] args) { + System.out.println(defineSourceConfig(new ConfigDef()).toHtml(4, config -> "mirror_source_" + config)); } } diff --git a/docs/configuration.html b/docs/configuration.html index 3da38944f1b4b..966f3fa765d4b 100644 --- a/docs/configuration.html +++ b/docs/configuration.html @@ -267,23 +267,42 @@
This system property is used to disable the problematic login modules usage in SASL JAAS configuration. This property accepts comma-separated list of loginModule names. By default com.sun.security.auth.module.JndiLoginModule loginModule is disabled. -
If users want to enable JndiLoginModule, users need to explicitly reset the system property like below. We advise the users to validate configurations and only allow trusted JNDI configurations. For more details CVE-2023-25194. -
-Dorg.apache.kafka.disallowed.login.modules=-
To disable more loginModules, update the system property with comma-separated loginModule names. Make sure to explicitly add JndiLoginModule module name to the comma-separated list like below. -
-Dorg.apache.kafka.disallowed.login.modules=com.sun.security.auth.module.JndiLoginModule,com.ibm.security.auth.module.LdapLoginModule,com.ibm.security.auth.module.Krb5LoginModule-
| Since: | 3.4.0 |
|---|---|
| Default Value: | com.sun.security.auth.module.JndiLoginModule |
This system property is used to disable the problematic login modules usage in SASL JAAS configuration. This property accepts comma-separated list of loginModule names. By default com.sun.security.auth.module.JndiLoginModule loginModule is disabled. +
If users want to enable JndiLoginModule, users need to explicitly reset the system property like below. We advise the users to validate configurations and only allow trusted JNDI configurations. For more details CVE-2023-25194. +
-Dorg.apache.kafka.disallowed.login.modules=+
To disable more loginModules, update the system property with comma-separated loginModule names. Make sure to explicitly add JndiLoginModule module name to the comma-separated list like below. +
-Dorg.apache.kafka.disallowed.login.modules=com.sun.security.auth.module.JndiLoginModule,com.ibm.security.auth.module.LdapLoginModule,com.ibm.security.auth.module.Krb5LoginModule+
| Since: | 3.4.0 |
|---|---|
| Default Value: | com.sun.security.auth.module.JndiLoginModule |
refresh.topics.enabled: whether to check for new topics in the source cluster periodically (default: true)
- refresh.topics.interval.seconds: frequency of checking for new topics in the source cluster; lower values than the default may lead to performance degradation (default: 600, every ten minutes)
- refresh.groups.enabled: whether to check for new consumer groups in the source cluster periodically (default: true)
- refresh.groups.interval.seconds: frequency of checking for new consumer groups in the source cluster; lower values than the default may lead to performance degradation (default: 600, every ten minutes)
- sync.topic.configs.enabled: whether to replicate topic configurations from the source cluster (default: true)
- sync.topic.acls.enabled: whether to sync ACLs from the source cluster (default: true)
- emit.heartbeats.enabled: whether to emit heartbeats periodically (default: true)
- emit.heartbeats.interval.seconds: frequency at which heartbeats are emitted (default: 1, every one seconds)
- heartbeats.topic.replication.factor: replication factor of MirrorMaker's internal heartbeat topics (default: 3)
- emit.checkpoints.enabled: whether to emit MirrorMaker's consumer offsets periodically (default: true)
- emit.checkpoints.interval.seconds: frequency at which checkpoints are emitted (default: 60, every minute)
- checkpoints.topic.replication.factor: replication factor of MirrorMaker's internal checkpoints topics (default: 3)
- sync.group.offsets.enabled: whether to periodically write the translated offsets of replicated consumer groups (in the source cluster) to __consumer_offsets topic in target cluster, as long as no active consumers in that group are connected to the target cluster (default: false)
- sync.group.offsets.interval.seconds: frequency at which consumer group offsets are synced (default: 60, every minute)
- offset-syncs.topic.replication.factor: replication factor of MirrorMaker's internal offset-sync topics (default: 3)
-