Skip to content

UnifiedLog

Creating Instance

UnifiedLog takes the following to be created:

  • logStartOffset
  • LocalLog
  • BrokerTopicStats
  • producerIdExpirationCheckIntervalMs
  • LeaderEpochFileCache
  • ProducerStateManager
  • Topic ID
  • keepPartitionMetadataFile
  • remoteStorageSystemEnable (default: false)
  • LogOffsetsListener

UnifiedLog is created using apply utility.

Creating UnifiedLog

apply(
  dir: File,
  config: LogConfig,
  logStartOffset: Long,
  recoveryPoint: Long,
  scheduler: Scheduler,
  brokerTopicStats: BrokerTopicStats,
  time: Time,
  maxTransactionTimeoutMs: Int,
  producerStateManagerConfig: ProducerStateManagerConfig,
  producerIdExpirationCheckIntervalMs: Int,
  logDirFailureChannel: LogDirFailureChannel,
  lastShutdownClean: Boolean = true,
  topicId: Option[Uuid],
  keepPartitionMetadataFile: Boolean,
  numRemainingSegments: ConcurrentMap[String, Int] = new ConcurrentHashMap[String, Int],
  remoteStorageSystemEnable: Boolean = false,
  logOffsetsListener: LogOffsetsListener = LogOffsetsListener.NO_OP_OFFSETS_LISTENER): UnifiedLog

apply...FIXME


apply is used when: