Class RemoteLogSegmentMetadata


public class RemoteLogSegmentMetadata
extends RemoteLogMetadata
It describes the metadata about a topic partition's remote log segment in the remote storage. This is uniquely represented with RemoteLogSegmentId.

New instance is always created with the state as RemoteLogSegmentState.COPY_SEGMENT_STARTED. This can be updated by applying RemoteLogSegmentMetadataUpdate for the respective RemoteLogSegmentId of the RemoteLogSegmentMetadata.

  • Constructor Details

    • RemoteLogSegmentMetadata

      public RemoteLogSegmentMetadata​(RemoteLogSegmentId remoteLogSegmentId, long startOffset, long endOffset, long maxTimestampMs, int brokerId, long eventTimestampMs, int segmentSizeInBytes, Map<Integer,​Long> segmentLeaderEpochs)
      Creates an instance with the given metadata of remote log segment and its state as RemoteLogSegmentState.COPY_SEGMENT_STARTED.

      segmentLeaderEpochs can not be empty. If all the records in this segment belong to the same leader epoch then it should have an entry with epoch mapping to start-offset of this segment.

      remoteLogSegmentId - Universally unique remote log segment id.
      startOffset - Start offset of this segment (inclusive).
      endOffset - End offset of this segment (inclusive).
      maxTimestampMs - Maximum timestamp in this segment
      brokerId - Broker id from which this event is generated.
      eventTimestampMs - Epoch time in milli seconds at which the remote log segment is copied to the remote tier storage.
      segmentSizeInBytes - Size of this segment in bytes.
      segmentLeaderEpochs - leader epochs occurred within this segment
  • Method Details