Status
Current state: Under Discussion
Discussion thread: here
JIRA: [
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
It seems that naming LogCleaner is somewhat misleading and LogComparator is more appropriate one. So LogCleaner and related classes/methods/configs should be renamed to Comparator instead of Cleaner
Public Interfaces
log.cleaner.enable will be deprecated and eventually, it will be removed from the configuration. Going forward if log.cleanup.policy is set to compact then cleaner will be enabled implicitly.
Following old configuration will be deprecated and new renamed configuration will be introduced.
Existing configuration | New configuration |
---|---|
log.cleaner.backoff.ms | log.compactor.backoff.ms |
log.cleaner.dedupe.buffer.size | log.compactor.dedupe.buffer.size |
log.cleaner.delete.retention.ms | log.compactor.delete.retention.ms |
log.cleaner.io.buffer.load.factor | log.compactor.io.buffer.load.factor |
log.cleaner.io.buffer.size | log.compactor.io.buffer.size |
log.cleaner.io.max.bytes.per.second | log.compactor.io.max.bytes.per.second |
log.cleaner.min.cleanable.ratio | log.compactor.min.cleanable.ratio |
log.cleaner.min.compaction.lag.ms | log.compactor.min.compaction.lag.ms |
log.cleaner.threads | log.compactor.threads |
Proposed Changes
New renamed configuration will be introduced and existing configuration will be deprecated.
As proposed on JIRA, following approach will be considered while taking values.
0. Default value of the new config will be same as the deprecated config
1. If both deprecated and new config values are specified, log a WARN entry will be emitted and the new config value will be chosen.
2. If only one of them is specified, its value will be chosen.
3. If none of them are specified, then the default value, which should be the same, will be used.
Apart from the configuration changes mentioned above, following Classes will be renamed.
Also, all variables, methods and documentation in the classes will be updated to reflect the new name changes. All related test-cases will be renamed as well.
Existing Class name | New Class name |
---|---|
LogCleaner | LogCompactor |
LogCleanerManager | LogCompactorManager |
ClenerConfig | CompactorConfig |
LogCleaningAbortedException | LogCompactionAbortedException |
Compatibility, Deprecation, and Migration Plan
Existing configuration will be deprecated first and then eventually it will be removed.
Rejected Alternatives