public class SnapshotManager
extends Object
| Constructor and Description |
|---|
SnapshotManager(Path logPath,
Path tablePath) |
| Modifier and Type | Method and Description |
|---|---|
Snapshot |
buildLatestSnapshot(Engine engine)
Construct the latest snapshot for given table.
|
void |
checkpoint(Engine engine,
Clock clock,
long version) |
Snapshot |
getSnapshotAt(Engine engine,
long version)
Construct the snapshot for the given table at the version provided.
|
Snapshot |
getSnapshotForTimestamp(Engine engine,
long millisSinceEpochUTC)
Construct the snapshot for the given table at the provided timestamp.
|
static void |
verifyDeltaVersions(java.util.List<Long> versions,
java.util.Optional<Long> expectedStartVersion,
java.util.Optional<Long> expectedEndVersion,
Path tablePath)
- Verify the versions are contiguous.
|
public static void verifyDeltaVersions(java.util.List<Long> versions,
java.util.Optional<Long> expectedStartVersion,
java.util.Optional<Long> expectedEndVersion,
Path tablePath)
public Snapshot buildLatestSnapshot(Engine engine) throws TableNotFoundException
engine - Instance of Engine to use.TableNotFoundExceptionpublic Snapshot getSnapshotAt(Engine engine, long version) throws TableNotFoundException
engine - Instance of Engine to use.version - The snapshot version to constructSnapshot of the table at version versionTableNotFoundExceptionpublic Snapshot getSnapshotForTimestamp(Engine engine, long millisSinceEpochUTC) throws TableNotFoundException
engine - Instance of Engine to use.millisSinceEpochUTC - timestamp to fetch the snapshot for in milliseconds since the unix
epochSnapshot of the table at the provided timestampTableNotFoundExceptionpublic void checkpoint(Engine engine, Clock clock, long version) throws TableNotFoundException, java.io.IOException
TableNotFoundExceptionjava.io.IOException