log4j.logger.kafka.log.TimeIndex=ALL
TimeIndex — Index Of Timestamp And Offsets Of Log Segment
TimeIndex
is an index of the timestamps and the offsets of a LogSegment.
TimeIndex
uses entrySize of 12 bytes (12-byte time index entries).
TimeIndex
is created when:
-
Lazily for a log segment (via forTime utility that defers loading the underlying index file until needed)
-
DumpLogSegments tool is used (to dump a time index (of a log segment))
Tip
|
Enable Add the following line to Refer to Logging. |
Creating TimeIndex Instance
TimeIndex
takes the following to be created:
-
Underlying File
TimeIndex
initializes the internal properties.
While being created, TimeIndex
prints out the following DEBUG message to the logs:
Loaded index file [absolutePath] with maxEntries = [maxEntries], maxIndexSize = [maxIndexSize], entries = [_entries], lastOffset = [_lastOffset], file position = [position]
lookup
Method
lookup(
targetTimestamp: Long): TimestampOffset
lookup
…FIXME
Note
|
lookup is used when…FIXME
|
truncateTo
Method
truncateTo(
offset: Long): Unit
Note
|
truncateTo is part of the AbstractIndex Contract to…FIXME.
|
truncateTo
…FIXME
lastEntryFromIndexFile
Internal Method
lastEntryFromIndexFile: TimestampOffset
lastEntryFromIndexFile
…FIXME
Note
|
lastEntryFromIndexFile is used when…FIXME
|