public class LogSegment
extends Object
| Modifier and Type | Field and Description |
|---|---|
java.util.List<FileStatus> |
checkpoints |
java.util.Optional<Long> |
checkpointVersionOpt |
java.util.List<FileStatus> |
deltas |
long |
lastCommitTimestamp |
Path |
logPath |
long |
version |
| Constructor and Description |
|---|
LogSegment(Path logPath,
long version,
java.util.List<FileStatus> deltas,
java.util.List<FileStatus> checkpoints,
java.util.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.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<FileStatus> |
allLogFilesReversed() |
java.util.List<FileStatus> |
allLogFilesUnsorted() |
static LogSegment |
empty(Path logPath) |
public final Path logPath
public final long version
public final java.util.List<FileStatus> deltas
public final java.util.List<FileStatus> checkpoints
public final java.util.Optional<Long> checkpointVersionOpt
public final long lastCommitTimestamp
public LogSegment(Path logPath, long version, java.util.List<FileStatus> deltas, java.util.List<FileStatus> checkpoints, java.util.Optional<Long> checkpointVersionOpt, long lastCommitTimestamp)
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.public static LogSegment empty(Path logPath)
public java.util.List<FileStatus> allLogFilesUnsorted()
public java.util.List<FileStatus> allLogFilesReversed()