Class DeltaHistoryManager

Object
io.delta.kernel.internal.DeltaHistoryManager

public final class DeltaHistoryManager extends Object
  • Method Details

    • getActiveCommitAtTimestamp

      public static long getActiveCommitAtTimestamp(Engine engine, Path logPath, long timestamp) throws TableNotFoundException
      Returns the latest recreatable commit that happened at or before timestamp. If the provided timestamp is after the timestamp of the latest version of the table throws an exception. If the provided timestamp is before the timestamp of the earliest version of the table throws an exception.
      Parameters:
      engine - instance of Engine to use
      logPath - the _delta_log path of the table
      timestamp - the timestamp find the version for in milliseconds since the unix epoch
      Returns:
      the active recreatable commit version at the provided timestamp
      Throws:
      TableNotFoundException - when there is no Delta table at the given path
    • getEarliestRecreatableCommit

      public static long getEarliestRecreatableCommit(Engine engine, Path logPath) throws TableNotFoundException
      Gets the earliest commit that we can recreate. Note that this version isn't guaranteed to exist when performing an action as a concurrent operation can delete the file during cleanup. This value must be used as a lower bound. We search for the earliest checkpoint we have, or whether we have the 0th delta file. This method assumes that the commits are contiguous.
      Throws:
      TableNotFoundException