Skip to content

DeltaErrors Utility

concurrentAppendException

concurrentAppendException(
  conflictingCommit: Option[CommitInfo],
  partition: String,
  customRetryMsg: Option[String] = None): ConcurrentAppendException

concurrentAppendException creates a ConcurrentAppendException with the following message:

Files were added to [partition] by a concurrent update. [customRetryMsg] | Please try the operation again.
Conflicting commit: [commitinfo]
Refer to [docs]/concurrency-control.html for more details.

concurrentAppendException is used when:

concurrentDeleteDeleteException

concurrentDeleteDeleteException(
  conflictingCommit: Option[CommitInfo],
  file: String): ConcurrentDeleteDeleteException

concurrentDeleteDeleteException creates a ConcurrentDeleteDeleteException with the following message:

This transaction attempted to delete one or more files that were deleted (for example [file]) by a concurrent update. Please try the operation again.
Conflicting commit: [commitinfo]
Refer to [docs]/concurrency-control.html for more details.

concurrentDeleteDeleteException is used when:

concurrentDeleteReadException

concurrentDeleteReadException(
  conflictingCommit: Option[CommitInfo],
  file: String): ConcurrentDeleteReadException

concurrentDeleteReadException creates a ConcurrentDeleteReadException with the following message:

This transaction attempted to read one or more files that were deleted (for example [file]) by a concurrent update. Please try the operation again.
Conflicting commit: [commitinfo]
Refer to [docs]/concurrency-control.html for more details.

concurrentDeleteReadException is used when:

concurrentTransactionException

concurrentTransactionException(
  conflictingCommit: Option[CommitInfo]): ConcurrentTransactionException

concurrentTransactionException creates a ConcurrentTransactionException with the following message:

This error occurs when multiple streaming queries are using the same checkpoint to write into this table.
Did you run multiple instances of the same streaming query at the same time?
Conflicting commit: [commitinfo]
Refer to [docs]/concurrency-control.html for more details.

concurrentTransactionException is used when:

concurrentWriteException

concurrentWriteException(
  conflictingCommit: Option[CommitInfo]): ConcurrentWriteException

concurrentWriteException creates a ConcurrentWriteException with the following message:

A concurrent transaction has written new data since the current transaction read the table. Please try the operation again.
Conflicting commit: [commitinfo]
Refer to [docs]/concurrency-control.html for more details.

concurrentWriteException is used when:

metadataChangedException

metadataChangedException(
  conflictingCommit: Option[CommitInfo]): MetadataChangedException

metadataChangedException creates a MetadataChangedException with the following message:

The metadata of the Delta table has been changed by a concurrent update. Please try the operation again.
Conflicting commit: [commitinfo]
Refer to [docs]/concurrency-control.html for more details.

metadataChangedException is used when:

protocolChangedException

protocolChangedException(
  conflictingCommit: Option[CommitInfo]): ProtocolChangedException

protocolChangedException creates a ProtocolChangedException with the following message:

The protocol version of the Delta table has been changed by a concurrent update.
[additionalInfo]
Please try the operation again.
Conflicting commit: [commitinfo]
Refer to [docs]/concurrency-control.html for more details.

protocolChangedException is used when:

modifyAppendOnlyTableException

modifyAppendOnlyTableException: Throwable

modifyAppendOnlyTableException throws an UnsupportedOperationException:

This table is configured to only allow appends. If you would like to permit updates or deletes, use 'ALTER TABLE <table_name> SET TBLPROPERTIES (appendOnly=false)'.

modifyAppendOnlyTableException is used when:

notNullColumnMissingException

notNullColumnMissingException(
  constraint: Constraints.NotNull): Throwable

notNullColumnMissingException creates a InvariantViolationException with the following error message:

Column [name], which has a NOT NULL constraint, is missing from the data being written into the table.

notNullColumnMissingException is used when:

Reporting Post-Commit Hook Failure

postCommitHookFailedException(
  failedHook: PostCommitHook,
  failedOnCommitVersion: Long,
  extraErrorMessage: String,
  error: Throwable): Throwable

postCommitHookFailedException throws a RuntimeException:

Committing to the Delta table version [failedOnCommitVersion] succeeded but error while executing post-commit hook [failedHook]: [extraErrorMessage]

postCommitHookFailedException is used when:

  • GenerateSymlinkManifestImpl is requested to handleError

Last update: 2021-06-11