case class CommittedTransaction(txnId: String, deltaLog: DeltaLog, catalogTable: Option[CatalogTable], snapshot: Snapshot, metadata: Metadata, protocol: Protocol, committedVersion: Long, committedActions: Seq[Action], postCommitSnapshot: Snapshot, postCommitHooks: Seq[PostCommitHook], finalTxnExecutionTimeMs: Long, finalNeedsCheckpoint: Boolean, finalPartitionsAddedToOpt: Option[HashSet[Map[String, String]]], finalIsBlindAppend: Boolean) extends DeltaTransaction with Product with Serializable
Represents a successfully committed transaction.
This class encapsulates all relevant information about a transaction that has been successfully committed. The main usage of this class is in running the post-commit hooks.
- txnId
the unique identifier of the committed transaction.
- deltaLog
the DeltaLog instance for the table the transaction committed on.
- catalogTable
the catalog table at the start of the transaction for the committed table.
- snapshot
the snapshot of the table at the time of the transaction's read.
- metadata
the metadata of the table after the txn committed.
- protocol
the protocol of the table after the txn committed.
- committedVersion
the version of the table after the txn committed.
- committedActions
the actions that were committed in this transaction.
- postCommitSnapshot
the snapshot of the table after the txn successfully committed. NOTE: This may not match the committedVersion, if racing commits were written while the snapshot was computed.
- postCommitHooks
the list of post-commit hooks to run after the commit.
- finalTxnExecutionTimeMs
the time taken to execute the transaction.
- finalNeedsCheckpoint
whether a checkpoint is needed after the commit.
- finalPartitionsAddedToOpt
the partitions that this txn added new files to.
- finalIsBlindAppend
whether this transaction was a blind append.
- Alphabetic
- By Inheritance
- CommittedTransaction
- Serializable
- Product
- Equals
- DeltaTransaction
- DeltaLogging
- DatabricksLogging
- DeltaProgressReporter
- LoggingShims
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new CommittedTransaction(txnId: String, deltaLog: DeltaLog, catalogTable: Option[CatalogTable], snapshot: Snapshot, metadata: Metadata, protocol: Protocol, committedVersion: Long, committedActions: Seq[Action], postCommitSnapshot: Snapshot, postCommitHooks: Seq[PostCommitHook], finalTxnExecutionTimeMs: Long, finalNeedsCheckpoint: Boolean, finalPartitionsAddedToOpt: Option[HashSet[Map[String, String]]], finalIsBlindAppend: Boolean)
- txnId
the unique identifier of the committed transaction.
- deltaLog
the DeltaLog instance for the table the transaction committed on.
- catalogTable
the catalog table at the start of the transaction for the committed table.
- snapshot
the snapshot of the table at the time of the transaction's read.
- metadata
the metadata of the table after the txn committed.
- protocol
the protocol of the table after the txn committed.
- committedVersion
the version of the table after the txn committed.
- committedActions
the actions that were committed in this transaction.
- postCommitSnapshot
the snapshot of the table after the txn successfully committed. NOTE: This may not match the committedVersion, if racing commits were written while the snapshot was computed.
- postCommitHooks
the list of post-commit hooks to run after the commit.
- finalTxnExecutionTimeMs
the time taken to execute the transaction.
- finalNeedsCheckpoint
whether a checkpoint is needed after the commit.
- finalPartitionsAddedToOpt
the partitions that this txn added new files to.
- finalIsBlindAppend
whether this transaction was a blind append.
Type Members
- implicit class LogStringContext extends AnyRef
- Definition Classes
- Logging
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val catalogTable: Option[CatalogTable]
- Definition Classes
- CommittedTransaction → DeltaTransaction
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- val committedActions: Seq[Action]
- val committedVersion: Long
- def deltaAssert(check: => Boolean, name: String, msg: String, deltaLog: DeltaLog = null, data: AnyRef = null, path: Option[Path] = None): Unit
Helper method to check invariants in Delta code.
Helper method to check invariants in Delta code. Fails when running in tests, records a delta assertion event and logs a warning otherwise.
- Attributes
- protected
- Definition Classes
- DeltaLogging
- val deltaLog: DeltaLog
- Definition Classes
- CommittedTransaction → DeltaTransaction
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val finalIsBlindAppend: Boolean
- val finalNeedsCheckpoint: Boolean
- val finalPartitionsAddedToOpt: Option[HashSet[Map[String, String]]]
- val finalTxnExecutionTimeMs: Long
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def getCommonTags(deltaLog: DeltaLog, tahoeId: String): Map[TagDefinition, String]
- Definition Classes
- DeltaLogging
- def getErrorData(e: Throwable): Map[String, Any]
- Definition Classes
- DeltaLogging
- def getUserMetadata(op: Operation): Option[String]
Return the user-defined metadata for the operation.
Return the user-defined metadata for the operation.
- Definition Classes
- DeltaTransaction
- def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
- val isBlindAppend: Boolean
True if this transaction is a blind append.
True if this transaction is a blind append. This is only valid after commit.
- Attributes
- protected[delta]
- Definition Classes
- DeltaTransaction
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def log: Logger
- Attributes
- protected
- Definition Classes
- Logging
- def logConsole(line: String): Unit
- Definition Classes
- DatabricksLogging
- def logDebug(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logName: String
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- val metadata: Metadata
Returns the metadata for this transaction.
Returns the metadata for this transaction. The metadata refers to the metadata of the snapshot at the transaction's read version unless updated during the transaction.
- Definition Classes
- CommittedTransaction → DeltaTransaction
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- val partitionsAddedToOpt: Option[HashSet[Map[String, String]]]
The set of distinct partitions that contain added files by current transaction.
The set of distinct partitions that contain added files by current transaction.
- Attributes
- protected[delta]
- Definition Classes
- DeltaTransaction
- val postCommitHooks: Seq[PostCommitHook]
- val postCommitSnapshot: Snapshot
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val protocol: Protocol
The protocol of the snapshot that this transaction is reading at.
The protocol of the snapshot that this transaction is reading at.
- Definition Classes
- CommittedTransaction → DeltaTransaction
- def recordDeltaEvent(deltaLog: DeltaLog, opType: String, tags: Map[TagDefinition, String] = Map.empty, data: AnyRef = null, path: Option[Path] = None): Unit
Used to record the occurrence of a single event or report detailed, operation specific statistics.
Used to record the occurrence of a single event or report detailed, operation specific statistics.
- path
Used to log the path of the delta table when
deltaLogis null.
- Attributes
- protected
- Definition Classes
- DeltaLogging
- def recordDeltaOperation[A](deltaLog: DeltaLog, opType: String, tags: Map[TagDefinition, String] = Map.empty)(thunk: => A): A
Used to report the duration as well as the success or failure of an operation on a
deltaLog.Used to report the duration as well as the success or failure of an operation on a
deltaLog.- Attributes
- protected
- Definition Classes
- DeltaLogging
- def recordDeltaOperationForTablePath[A](tablePath: String, opType: String, tags: Map[TagDefinition, String] = Map.empty)(thunk: => A): A
Used to report the duration as well as the success or failure of an operation on a
tahoePath.Used to report the duration as well as the success or failure of an operation on a
tahoePath.- Attributes
- protected
- Definition Classes
- DeltaLogging
- def recordEvent(metric: MetricDefinition, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, trimBlob: Boolean = true): Unit
- Definition Classes
- DatabricksLogging
- def recordFrameProfile[T](group: String, name: String)(thunk: => T): T
- Attributes
- protected
- Definition Classes
- DeltaLogging
- def recordOperation[S](opType: OpType, opTarget: String = null, extraTags: Map[TagDefinition, String], isSynchronous: Boolean = true, alwaysRecordStats: Boolean = false, allowAuthTags: Boolean = false, killJvmIfStuck: Boolean = false, outputMetric: MetricDefinition = METRIC_OPERATION_DURATION, silent: Boolean = true)(thunk: => S): S
- Definition Classes
- DatabricksLogging
- def recordProductEvent(metric: MetricDefinition with CentralizableMetric, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, trimBlob: Boolean = true): Unit
- Definition Classes
- DatabricksLogging
- def recordProductUsage(metric: MetricDefinition with CentralizableMetric, quantity: Double, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, forceSample: Boolean = false, trimBlob: Boolean = true, silent: Boolean = false): Unit
- Definition Classes
- DatabricksLogging
- def recordUsage(metric: MetricDefinition, quantity: Double, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, forceSample: Boolean = false, trimBlob: Boolean = true, silent: Boolean = false): Unit
- Definition Classes
- DatabricksLogging
- def runPostCommitHook(hook: PostCommitHook, committedTransaction: CommittedTransaction): Unit
Runs a post-commit hook, handling any exceptions that occur.
Runs a post-commit hook, handling any exceptions that occur.
- Attributes
- protected
- Definition Classes
- DeltaTransaction
- def setNeedsCheckpoint(committedVersion: Long, postCommitSnapshot: Snapshot): Unit
Sets needsCheckpoint if we should checkpoint the version that has just been committed.
Sets needsCheckpoint if we should checkpoint the version that has just been committed.
- Attributes
- protected
- Definition Classes
- DeltaTransaction
- val snapshot: Snapshot
- Definition Classes
- CommittedTransaction → DeltaTransaction
- def spark: SparkSession
The current spark session
The current spark session
- Attributes
- protected
- Definition Classes
- DeltaTransaction
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def txnExecutionTimeMs: Option[Long]
The end to end execution time of this transaction.
The end to end execution time of this transaction.
- Definition Classes
- CommittedTransaction → DeltaTransaction
- val txnId: String
Unique identifier for the transaction
Unique identifier for the transaction
- Definition Classes
- CommittedTransaction → DeltaTransaction
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withLogContext(context: Map[String, String])(body: => Unit): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def withStatusCode[T](statusCode: String, defaultMessage: String, data: Map[String, Any] = Map.empty)(body: => T): T
Report a log to indicate some command is running.
Report a log to indicate some command is running.
- Definition Classes
- DeltaProgressReporter
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)