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 @@

-

3.8 System Properties

+

3.8 MirrorMaker Configs

+ Below is the configuration of the connectors that make up MirrorMaker 2. + +

3.8.1 MirrorMaker Common Configs

+ Below are the common configuration properties that apply to all three connectors. + + +

3.8.2 MirrorMaker Source Configs

+ Below is the configuration of MirrorMaker 2 source connector for replicating topics. + + +

3.8.3 MirrorMaker Checkpoint Configs

+ Below is the configuration of MirrorMaker 2 checkpoint connector for emitting consumer offset checkpoints. + + +

3.8.4 MirrorMaker HeartBeat Configs

+ Below is the configuration of MirrorMaker 2 heartbeat connector for checking connectivity between connectors and clusters. + + +

3.9 System Properties

Kafka supports some configuration that can be enabled through Java system properties. System properties are usually set by passing the -D flag to the Java virtual machine in which Kafka components are running. Below are the supported system properties. +
  • +

    org.apache.kafka.disallowed.login.modules

    +

    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
    +
  • +
    diff --git a/docs/ops.html b/docs/ops.html index fae7a035d1189..7e5f4e19bb0d7 100644 --- a/docs/ops.html +++ b/docs/ops.html @@ -766,27 +766,9 @@
    MirrorMakerConfig and MirrorConnectorConfig for further details. + Additional configuration settings are supported which can be left with their default values in most cases. See MirrorMaker Configs.

    - -
    Securing Replication Flows