Package org.apache.iceberg
Interface Rollback
-
- All Superinterfaces:
PendingUpdate<Snapshot>
public interface Rollback extends PendingUpdate<Snapshot>
API for rolling table data back to the state at an older tablesnapshot
.This API does not allow conflicting calls to
toSnapshotId(long)
andtoSnapshotAtTime(long)
.When committing, these changes will be applied to the current table metadata. Commit conflicts will not be resolved and will result in a
CommitFailedException
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Rollback
toSnapshotAtTime(long timestampMillis)
Deprecated.Replaced byManageSnapshots.rollbackToTime(long)
Rollback
toSnapshotId(long snapshotId)
Deprecated.Replaced byManageSnapshots.setCurrentSnapshot(long)
-
Methods inherited from interface org.apache.iceberg.PendingUpdate
apply, commit, updateEvent
-
-
-
-
Method Detail
-
toSnapshotId
@Deprecated Rollback toSnapshotId(long snapshotId)
Deprecated.Replaced byManageSnapshots.setCurrentSnapshot(long)
Roll this table's data back to a specificSnapshot
identified by id.- Parameters:
snapshotId
- long id of the snapshot to roll back table data to- Returns:
- this for method chaining
- Throws:
java.lang.IllegalArgumentException
- If the table has no snapshot with the given id
-
toSnapshotAtTime
@Deprecated Rollback toSnapshotAtTime(long timestampMillis)
Deprecated.Replaced byManageSnapshots.rollbackToTime(long)
Roll this table's data back to the lastSnapshot
before the given timestamp.- Parameters:
timestampMillis
- a long timestamp, as returned bySystem.currentTimeMillis()
- Returns:
- this for method chaining
- Throws:
java.lang.IllegalArgumentException
- If the table has no old snapshot before the given timestamp
-
-