Class LogSegment
Object
io.delta.kernel.internal.snapshot.LogSegment
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal List<FileStatus>final List<FileStatus>final longfinal Pathfinal long -
Constructor Summary
ConstructorsConstructorDescriptionLogSegment(Path logPath, long version, List<FileStatus> deltas, List<FileStatus> checkpoints, Optional<Long> checkpointVersionOpt, long lastCommitTimestamp) Provides information around which files in the transaction log need to be read to create the given version of the log. -
Method Summary
-
Field Details
-
logPath
-
version
public final long version -
deltas
-
checkpoints
-
checkpointVersionOpt
-
lastCommitTimestamp
public final long lastCommitTimestamp
-
-
Constructor Details
-
LogSegment
public LogSegment(Path logPath, long version, List<FileStatus> deltas, List<FileStatus> checkpoints, Optional<Long> checkpointVersionOpt, long lastCommitTimestamp) Provides information around which files in the transaction log need to be read to create the given version of the log.- Parameters:
logPath- The path to the _delta_log directoryversion- The Snapshot version to generatedeltas- The delta commit files (.json) to readcheckpoints- The checkpoint file(s) to readcheckpointVersionOpt- The checkpoint version used to start replaylastCommitTimestamp- The "unadjusted" timestamp of the last commit within this segment. By unadjusted, we mean that the commit timestamps may not necessarily be monotonically increasing for the commits within this segment.
-
-
Method Details
-
empty
-
allLogFilesUnsorted
- Returns:
- all deltas (.json) and checkpoint (.checkpoint.parquet) files in this LogSegment, with no ordering guarantees.
-
allLogFilesReversed
- Returns:
- all deltas (.json) and checkpoint (.checkpoint.parquet) files in this LogSegment, sorted in reverse (00012.json, 00011.json, 00010.checkpoint.parquet) order.
-