Skip to content

LocalLog

Creating Instance

LocalLog takes the following to be created:

  • Directory
  • LogConfig
  • LogSegments
  • Recovery Point
  • LogOffsetMetadata
  • Scheduler
  • Time
  • TopicPartition
  • LogDirFailureChannel

LocalLog is created when:

truncateFullyAndStartAt

truncateFullyAndStartAt(
  newOffset: Long): Iterable[LogSegment]

truncateFullyAndStartAt...FIXME


truncateFullyAndStartAt is used when:

roll

roll(
  expectedNextOffset: Option[Long] = None): LogSegment

roll...FIXME


roll is used when:

  • UnifiedLog is requested to roll

splitOverflowedSegment

splitOverflowedSegment(
  segment: LogSegment,
  existingSegments: LogSegments,
  dir: File,
  topicPartition: TopicPartition,
  config: LogConfig,
  scheduler: Scheduler,
  logDirFailureChannel: LogDirFailureChannel,
  logPrefix: String): SplitSegmentResult

splitOverflowedSegment...FIXME


splitOverflowedSegment is used when:

createNewCleanedSegment

createNewCleanedSegment(
  dir: File,
  logConfig: LogConfig,
  baseOffset: Long): LogSegment

createNewCleanedSegment...FIXME


createNewCleanedSegment is used when:

createAndDeleteSegment

createAndDeleteSegment(
  newOffset: Long,
  segmentToDelete: LogSegment,
  asyncDelete: Boolean,
  reason: SegmentDeletionReason): LogSegment

createAndDeleteSegment...FIXME


createAndDeleteSegment is used when: