entrySize: Int
AbstractIndex
AbstractIndex is the abstraction of indices that use entrySize to index offsets and timestamps of a LogSegment.
|
Note
|
Kafka mmaps index files into memory, and all the read / write operations of the index is through OS page cache. This avoids blocked disk I/O in most cases. |
|
Tip
|
Use DumpLogSegments tool to review the content of indexes of a log segment. |
| Method | Description |
|---|---|
|
Used when…FIXME |
|
Used when…FIXME |
|
Used when…FIXME |
|
Used when…FIXME |
|
Used when…FIXME |
| AbstractIndex | Description |
|---|---|
Creating AbstractIndex Instance
AbstractIndex takes the following to be created:
AbstractIndex initializes the internal properties.
|
Note
|
AbstractIndex is a Scala abstract class and cannot be created directly. It is created indirectly for the concrete AbstractIndexes.
|
reset Method
reset(): Unit
reset truncate and then resize to the maxIndexSize.
|
Note
|
reset is used when…FIXME
|
_warmEntries Method
_warmEntries: Int
_warmEntries is the number of warm entries of the size in 8192 (bytes?)
|
Note
|
_warmEntries is used when AbstractIndex is requested to indexSlotRangeFor.
|
largestLowerBoundSlotFor Method
largestLowerBoundSlotFor(
idx: ByteBuffer,
target: Long,
searchEntity: IndexSearchEntity): Int
largestLowerBoundSlotFor…FIXME
|
Note
|
|
smallestUpperBoundSlotFor Method
smallestUpperBoundSlotFor(
idx: ByteBuffer,
target: Long,
searchEntity: IndexSearchEntity): Int
smallestUpperBoundSlotFor…FIXME
|
Note
|
smallestUpperBoundSlotFor is used when OffsetIndex is requested to fetchUpperBoundOffset.
|
indexSlotRangeFor Internal Method
indexSlotRangeFor(
idx: ByteBuffer,
target: Long,
searchEntity: IndexSearchEntity): (Int, Int)
indexSlotRangeFor…FIXME
|
Note
|
indexSlotRangeFor is used when AbstractIndex is requested for the largestLowerBoundSlotFor and the smallestUpperBoundSlotFor.
|