public interface ManageSnapshots extends PendingUpdate<Snapshot>
snapshot.
Rollback:
This API does not allow conflicting calls to setCurrentSnapshot(long) and
rollbackToTime(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.
Cherrypick:
In an audit workflow, new data is written to an orphan snapshot that is not committed as
the table's current state until it is audited. After auditing a change, it may need to be applied or cherry-picked
on top of the latest snapshot instead of the one that was current when the audited changes were created.
This class adds support for cherry-picking the changes from an orphan snapshot by applying them to
the current snapshot. The output of the operation is a new snapshot with the changes from cherry-picked
snapshot.
| Modifier and Type | Method and Description |
|---|---|
ManageSnapshots |
cherrypick(long snapshotId)
Apply supported changes in given snapshot and create a new snapshot which will be set as the
current snapshot on commit.
|
ManageSnapshots |
rollbackTo(long snapshotId)
Rollback table's state to a specific
Snapshot identified by id. |
ManageSnapshots |
rollbackToTime(long timestampMillis)
Roll this table's data back to the last
Snapshot before the given timestamp. |
ManageSnapshots |
setCurrentSnapshot(long snapshotId)
Roll this table's data back to a specific
Snapshot identified by id. |
apply, commit, updateEventManageSnapshots setCurrentSnapshot(long snapshotId)
Snapshot identified by id.snapshotId - long id of the snapshot to roll back table data tojava.lang.IllegalArgumentException - If the table has no snapshot with the given idManageSnapshots rollbackToTime(long timestampMillis)
Snapshot before the given timestamp.timestampMillis - a long timestamp, as returned by System.currentTimeMillis()java.lang.IllegalArgumentException - If the table has no old snapshot before the given timestampManageSnapshots rollbackTo(long snapshotId)
Snapshot identified by id.snapshotId - long id of snapshot id to roll back table to. Must be an ancestor of the current snapshotjava.lang.IllegalArgumentException - If the table has no snapshot with the given idValidationException - If given snapshot id is not an ancestor of the current stateManageSnapshots cherrypick(long snapshotId)
snapshotId - a snapshotId whose changes to applyjava.lang.IllegalArgumentException - If the table has no snapshot with the given idDuplicateWAPCommitException - In case of a WAP workflow and if the table has has a duplicate commit with same
wapId