Interface CommitActions

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
CommitActionsImpl

@Evolving public interface CommitActions extends AutoCloseable
Represents all actions from a single commit version in a table.

Resource Management:

  • Each iterator returned by getActions() must be closed after use to release underlying resources.
  • The CommitActions object should be closed correctly (preferably using try-with-resources) to ensure any resources allocated during construction are properly released.

Example usage:


 try (CommitActions commitActions = ...) {
   long version = commitActions.getVersion();
   long timestamp = commitActions.getTimestamp();

   try (CloseableIterator<ColumnarBatch> actions = commitActions.getActions()) {
     while (actions.hasNext()) {
       ColumnarBatch batch = actions.next();
       // process batch
     }
   }
 }
 
Since:
4.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an iterator over the action batches for this commit.
    long
    Returns the commit timestamp in milliseconds since Unix epoch.
    long
    Returns the commit version number.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • getVersion

      long getVersion()
      Returns the commit version number.
      Returns:
      the version number of this commit
    • getTimestamp

      long getTimestamp()
      Returns the commit timestamp in milliseconds since Unix epoch.
      Returns:
      the timestamp of this commit
    • getActions

      Returns an iterator over the action batches for this commit.

      Each ColumnarBatch contains actions from this commit only.

      Note: All rows within all batches have the same version (returned by getVersion()).

      This method can be called multiple times, and each call returns a new iterator over the same set of batches. This supports use cases like two-pass processing (e.g., validation pass followed by processing pass).

      Callers are responsible for closing each iterator returned by this method. Each iterator must be closed after use to release underlying resources.

      Returns:
      a CloseableIterator over columnar batches containing this commit's actions