Skip to content

Post-Commit Hooks

= PostCommitHook

PostCommitHook is an <> of <> that have a <> and can be <> (when OptimisticTransactionImpl is <>).

[[contract]] .PostCommitHook Contract [cols="30m,70",options="header",width="100%"] |=== | Method | Description

| handleError a| [[handleError]]

[source, scala]

handleError( error: Throwable, version: Long): Unit = {}


Handles an error while <>

Used when OptimisticTransactionImpl is requested to <> (when <>)

| name a| [[name]]

[source, scala]

name: String

User-friendly name of the hook for error reporting

Used when:

  • DeltaErrors utility is used to <>

  • OptimisticTransactionImpl is requested to <> (when <>)

  • GenerateSymlinkManifestImpl is requested to <>

| run a| [[run]]

[source, scala]

run( spark: SparkSession, txn: OptimisticTransactionImpl, committedActions: Seq[Action]): Unit


Executes the post-commit hook

Used when OptimisticTransactionImpl is requested to <> (when <>)

|===

[[implementations]] NOTE: <> is the default and only known PostCommitHook in Delta Lake.


Last update: 2020-09-24