Class LogSegmentData
java.lang.Object
org.apache.kafka.server.log.remote.storage.LogSegmentData
@Evolving public class LogSegmentData extends Object
This represents all the required data and indexes for a specific log segment that needs to be stored in the remote
storage. This is passed with
RemoteStorageManager.copyLogSegmentData(RemoteLogSegmentMetadata, LogSegmentData)
while copying a specific log segment to the remote storage.-
Constructor Summary
Constructors Constructor Description LogSegmentData(Path logSegment, Path offsetIndex, Path timeIndex, Optional<Path> transactionIndex, Path producerSnapshotIndex, ByteBuffer leaderEpochIndex)
Creates a LogSegmentData instance with data and indexes. -
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
ByteBuffer
leaderEpochIndex()
Path
logSegment()
Path
offsetIndex()
Path
producerSnapshotIndex()
Path
timeIndex()
String
toString()
Optional<Path>
transactionIndex()
-
Constructor Details
-
LogSegmentData
public LogSegmentData(Path logSegment, Path offsetIndex, Path timeIndex, Optional<Path> transactionIndex, Path producerSnapshotIndex, ByteBuffer leaderEpochIndex)Creates a LogSegmentData instance with data and indexes.- Parameters:
logSegment
- actual log segment fileoffsetIndex
- offset index filetimeIndex
- time index filetransactionIndex
- transaction index file, which can be nullproducerSnapshotIndex
- producer snapshot until this segmentleaderEpochIndex
- leader-epoch-index until this segment
-
-
Method Details
-
logSegment
- Returns:
- Log segment file of this segment.
-
offsetIndex
- Returns:
- Offset index file.
-
timeIndex
- Returns:
- Time index file of this segment.
-
transactionIndex
- Returns:
- Transaction index file of this segment if it exists.
-
producerSnapshotIndex
- Returns:
- Producer snapshot file until this segment.
-
leaderEpochIndex
- Returns:
- Leader epoch index until this segment.
-
equals
-
hashCode
public int hashCode() -
toString
-