public final class DeltaHistoryManager
extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DeltaHistoryManager.Commit |
| Modifier and Type | Method and Description |
|---|---|
static DeltaHistoryManager.Commit |
getActiveCommitAtTimestamp(Engine engine,
Path logPath,
long timestamp,
boolean mustBeRecreatable,
boolean canReturnLastCommit,
boolean canReturnEarliestCommit)
Returns the latest commit that happened at or before
timestamp. |
static long |
getEarliestDeltaFile(Engine engine,
Path logPath)
Get the earliest commit available for this table.
|
static long |
getEarliestRecreatableCommit(Engine engine,
Path logPath)
Gets the earliest commit that we can recreate.
|
public static DeltaHistoryManager.Commit getActiveCommitAtTimestamp(Engine engine, Path logPath, long timestamp, boolean mustBeRecreatable, boolean canReturnLastCommit, boolean canReturnEarliestCommit) throws TableNotFoundException
timestamp.
If the timestamp is outside the range of [earliestCommit, latestCommit] then use parameters
canReturnLastCommit and canReturnEarliestCommit to control whether an exception
is thrown or the corresponding earliest/latest commit is returned.
engine - instance of Engine to uselogPath - the _delta_log path of the tabletimestamp - the timestamp find the version for in milliseconds since the unix epochmustBeRecreatable - whether the state at the returned commit should be recreatablecanReturnLastCommit - whether we can return the latest version of the table if the
provided timestamp is after the latest commitcanReturnEarliestCommit - whether we can return the earliest version of the table if the
provided timestamp is before the earliest commitKernelException - if the provided timestamp is before the earliest commit and
canReturnEarliestCommit is falseKernelException - if the provided timestamp is after the latest commit and
canReturnLastCommit is falseTableNotFoundException - when there is no Delta table at the given pathpublic static long getEarliestRecreatableCommit(Engine engine, Path logPath) throws TableNotFoundException
We search for the earliest checkpoint we have, or whether we have the 0th delta file. This method assumes that the commits are contiguous.
TableNotFoundExceptionpublic static long getEarliestDeltaFile(Engine engine, Path logPath) throws TableNotFoundException
TableNotFoundException