PostCommitHook¶
PostCommitHook
is an abstraction of post-commit hooks to be executed at the end of a successful transaction commit.
Contract¶
Name¶
name: String
User-friendly name of the hook (for error reporting)
See:
Used when:
DeltaErrorsBase
is requested to postCommitHookFailedExceptionOptimisticTransactionImpl
is requested to runPostCommitHook (that failed)
Executing Post-Commit Hook¶
run(
spark: SparkSession,
txn: OptimisticTransactionImpl,
committedVersion: Long,
postCommitSnapshot: Snapshot,
committedActions: Seq[Action]): Unit
Procedure
run
is a procedure (returns Unit
) so what happens inside stays inside (paraphrasing the former advertising slogan of Las Vegas, Nevada).
See:
Used when:
OptimisticTransactionImpl
is requested to runPostCommitHook (at transaction commit).