LogCleanerManager¶
LogCleanerManager
is used exclusively by LogCleaner to manage the state of partitions for Log Cleanup.
Creating Instance¶
LogCleanerManager
takes the following to be created:
- Log directories
-
TopicPartition
s and their UnifiedLogs (Pool[TopicPartition, UnifiedLog]
) -
LogDirFailureChannel
LogCleanerManager
is created along with a LogCleaner.
Performance Metrics¶
LogCleanerManager
is a KafkaMetricsGroup and registers the following performance metrics in kafka.log:type=LogCleanerManager group.
Metric Name | Description |
---|---|
max-dirty-percent | |
time-since-last-run-ms | |
uncleanable-bytes | (for every log directory) |
uncleanable-partitions-count | (for every log directory) |
grabFilthiestCompactedLog¶
grabFilthiestCompactedLog(
time: Time,
preCleanStats: PreCleanStats = new PreCleanStats()): Option[LogToClean]
grabFilthiestCompactedLog
...FIXME
grabFilthiestCompactedLog
is used when:
CleanerThread
is requested to clean the filthiest log
isCompactAndDelete¶
isCompactAndDelete(
log: UnifiedLog): Boolean
isCompactAndDelete
holds true when the given UnifiedLog is compact and delete.
isCompactAndDelete
holds true only when both compact and delete cleanup policies are included in the cleanup.policy configuration property. Otherwise, isCompactAndDelete
flag is disabled (false
).
Logging¶
LogCleanerManager
uses kafka.log.LogCleaner logger.