DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
Status
Current state: "Under Discussion"
Discussion thread: here
JIRA: KAFKA-19639
Motivation
In Kafka, there are some configurations that historically had different meanings but now provide the same functionality. Because of this overlap, users may find it confusing that different configuration names exist for the same setting. To reduce confusion and improve consistency, we should deprecate these redundant configurations and align them under a single configuration.
Public Interfaces
- org.apache.kafka.server.config.ServerLogConfigs
Proposed Changes
log.dirs & log.dir
After KIP-1161, log.dir was changed to a LIST-type configuration, allowing comma-separated log directories. As a result, log.dir and log.dirs now provide the same functionality. To avoid duplication and confusion, we should remove the log.dir configuration.
@Deprecated
public static final String LOG_DIR_CONFIG = LOG_PREFIX + "dir";
@Deprecated
public static final String LOG_DIR_DEFAULT = "/tmp/kafka-logs";
@Deprecated
public static final String LOG_DIR_DOC = "A comma-separated list of the directories where the log data is stored. (supplemental to \" + LOG_DIRS_CONFIG + \" property) " +
"This configuration has the same functionality as " + LOG_DIRS_CONFIG + " thus is deprecated and will be removed in Kafka 5.0.";
In Kafka 5.0, we should also update the default value of log.dirs and its validator.
public static final String LOG_DIRS_CONFIG = LOG_PREFIX + "dirs";
public static final String LOG_DIRS_DEFAULT = "/tmp/kafka-logs";
public static final String LOG_DIRS_DOC = "A comma-separated list of the directories where the log data is stored.";// define class
public class LogConfig extends AbstractConfig { // skip
.define(ServerLogConfigs.LOG_DIRS_CONFIG, STRING, ServerLogConfigs.LOG_DIRS_DEFAULT, ConfigDef.ValidList.anyNonDuplicateValues(false, false), HIGH, ServerLogConfigs.LOG_DIRS_DOC) // skip
}
Compatibility, Deprecation, and Migration Plan
We will add the `@Deprecated` annotation to these configurations. If users set any of them, Kafka 4.0 will print a warning message.
- These deprecated configurations will be fully removed in Kafka 5.0.
- Update the validator and default values for the remaining configurations in Kafka 5.0.
Test Plan
The unit tests and integration tests should be updated to use the non-deprecated configurations, and all tests must pass.
In Kafka 5.0 all tests should passed after add new default value and validator.
Rejected Alternatives
n/a