Record Class EqualityConvertPlan

java.lang.Object
java.lang.Record
org.apache.iceberg.flink.maintenance.operator.EqualityConvertPlan
Record Components:
dataFiles - new staging data files committed in the cycle
stagingDVFiles - staging DVs passed through to main, used by DVWriter to merge with newly-created DVs
eqDeleteFiles - equality delete files resolved this cycle. Removed by the committer when staging and target are the same branch, so readers stop applying them once the equivalent DVs commit. Empty on a separate target branch, where the eq deletes remain on staging.
stagingSnapshotId - staging snapshot the cycle resolved against, or NO_OP_STAGING_SNAPSHOT_ID for a no-op cycle
mainSnapshotId - main branch snapshot ID the index was resolved against, used for commit validation
triggerTimestamp - original trigger timestamp, forwarded by the Committer to the Aggregator
doneTimestamp - timestamp after which all phase watermarks have been emitted; the DVWriter should only process the result when the watermark reaches or exceeds this value
All Implemented Interfaces:
Serializable

@Internal public record EqualityConvertPlan(List<DataFile> dataFiles, List<DeleteFile> stagingDVFiles, List<DeleteFile> eqDeleteFiles, long stagingSnapshotId, Long mainSnapshotId, long triggerTimestamp, long doneTimestamp) extends Record implements Serializable
Result of equality convert planning. Produced by EqualityConvertPlanner and consumed by both EqualityConvertDVWriter (for partition info and DV merge gating) and EqualityConvertCommitter (for data files and staging deletes to commit).

A no-op cycle is encoded by stagingSnapshotId() == NO_OP_STAGING_SNAPSHOT_ID. Use noOp(Long, long, long) to construct one and noOp() to check.

See Also:
  • Field Details

    • NO_OP_STAGING_SNAPSHOT_ID

      public static final long NO_OP_STAGING_SNAPSHOT_ID
      See Also:
  • Constructor Details

    • EqualityConvertPlan

      public EqualityConvertPlan(List<DataFile> dataFiles, List<DeleteFile> stagingDVFiles, List<DeleteFile> eqDeleteFiles, long stagingSnapshotId, Long mainSnapshotId, long triggerTimestamp, long doneTimestamp)
      Creates an instance of a EqualityConvertPlan record class.
      Parameters:
      dataFiles - the value for the dataFiles record component
      stagingDVFiles - the value for the stagingDVFiles record component
      eqDeleteFiles - the value for the eqDeleteFiles record component
      stagingSnapshotId - the value for the stagingSnapshotId record component
      mainSnapshotId - the value for the mainSnapshotId record component
      triggerTimestamp - the value for the triggerTimestamp record component
      doneTimestamp - the value for the doneTimestamp record component
  • Method Details

    • noOp

      public boolean noOp()
      Returns true if this cycle has nothing to commit.
    • noOp

      public static EqualityConvertPlan noOp(Long mainSnapshotId, long triggerTimestamp, long doneTimestamp)
      No-op cycle: empty file lists, sentinel staging snapshot id.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • dataFiles

      public List<DataFile> dataFiles()
      Returns the value of the dataFiles record component.
      Returns:
      the value of the dataFiles record component
    • stagingDVFiles

      public List<DeleteFile> stagingDVFiles()
      Returns the value of the stagingDVFiles record component.
      Returns:
      the value of the stagingDVFiles record component
    • eqDeleteFiles

      public List<DeleteFile> eqDeleteFiles()
      Returns the value of the eqDeleteFiles record component.
      Returns:
      the value of the eqDeleteFiles record component
    • stagingSnapshotId

      public long stagingSnapshotId()
      Returns the value of the stagingSnapshotId record component.
      Returns:
      the value of the stagingSnapshotId record component
    • mainSnapshotId

      public Long mainSnapshotId()
      Returns the value of the mainSnapshotId record component.
      Returns:
      the value of the mainSnapshotId record component
    • triggerTimestamp

      public long triggerTimestamp()
      Returns the value of the triggerTimestamp record component.
      Returns:
      the value of the triggerTimestamp record component
    • doneTimestamp

      public long doneTimestamp()
      Returns the value of the doneTimestamp record component.
      Returns:
      the value of the doneTimestamp record component