Class Checkpointer

Object
io.delta.kernel.internal.checkpoints.Checkpointer

public class Checkpointer extends Object
Class to load and write the CheckpointMetaData from `_last_checkpoint` file.
  • Field Details

    • LAST_CHECKPOINT_FILE_NAME

      public static final String LAST_CHECKPOINT_FILE_NAME
      The name of the last checkpoint file
      See Also:
  • Constructor Details

    • Checkpointer

      public Checkpointer(Path tableLogPath)
  • Method Details

    • getLatestCompleteCheckpointFromList

      public static Optional<CheckpointInstance> getLatestCompleteCheckpointFromList(List<CheckpointInstance> instances, CheckpointInstance notLaterThan)
      Given a list of checkpoint files, pick the latest complete checkpoint instance which is not later than `notLaterThan`.
    • findLastCompleteCheckpointBefore

      public static Optional<CheckpointInstance> findLastCompleteCheckpointBefore(Engine engine, Path tableLogPath, long version)
      Find the last complete checkpoint before (strictly less than) a given version.
    • readLastCheckpointFile

      public Optional<CheckpointMetaData> readLastCheckpointFile(Engine engine)
      Returns information about the most recent checkpoint.
    • writeLastCheckpointFile

      public void writeLastCheckpointFile(Engine engine, CheckpointMetaData checkpointMetaData) throws IOException
      Write the given data to last checkpoint metadata file.
      Parameters:
      engine - Engine instance to use for writing
      checkpointMetaData - Checkpoint metadata to write
      Throws:
      IOException - For any I/O issues.