Interface PendingUpdate<T>

Type Parameters:
T - Java class of changes from this update; returned by apply() for validation.
All Known Subinterfaces:
AppendFiles, DeleteFiles, ExpireSnapshots, ManageSnapshots, OverwriteFiles, ReplacePartitions, ReplaceSortOrder, ReplaceViewVersion, RewriteFiles, RewriteManifests, RowDelta, SnapshotUpdate<ThisT>, UpdateLocation, UpdatePartitionSpec, UpdatePartitionStatistics, UpdateProperties, UpdateSchema, UpdateStatistics, UpdateViewProperties
All Known Implementing Classes:
BaseOverwriteFiles, BaseReplacePartitions, BaseReplaceSortOrder, BaseRewriteManifests, SetLocation, SetPartitionStatistics, SetStatistics, SnapshotManager, StreamingDelete

public interface PendingUpdate<T>
API for table metadata changes.
  • Method Summary

    Modifier and Type
    Method
    Description
    Apply the pending changes and return the uncommitted changes for validation.
    void
    Apply the pending changes and commit.
    default Object
    Generates update event to notify about metadata changes
  • Method Details

    • apply

      T apply()
      Apply the pending changes and return the uncommitted changes for validation.

      This does not result in a permanent update.

      Returns:
      the uncommitted changes that would be committed by calling commit()
      Throws:
      ValidationException - If the pending changes cannot be applied to the current metadata
      IllegalArgumentException - If the pending changes are conflicting or invalid
    • commit

      void commit()
      Apply the pending changes and commit.

      Changes are committed by calling the underlying table's commit method.

      Once the commit is successful, the updated table will be refreshed.

      Throws:
      ValidationException - If the update cannot be applied to the current table metadata.
      CommitFailedException - If the update cannot be committed due to conflicts.
      CommitStateUnknownException - If the update success or failure is unknown, no cleanup should be done in this case.
    • updateEvent

      default Object updateEvent()
      Generates update event to notify about metadata changes
      Returns:
      the generated event