Packages

c

org.apache.spark.sql.delta

CommittedTransaction

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.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CommittedTransaction
  2. Serializable
  3. Product
  4. Equals
  5. DeltaTransaction
  6. DeltaLogging
  7. DatabricksLogging
  8. DeltaProgressReporter
  9. LoggingShims
  10. Logging
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

  1. implicit class LogStringContext extends AnyRef
    Definition Classes
    Logging

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val catalogTable: Option[CatalogTable]
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. val committedActions: Seq[Action]
  8. val committedVersion: Long
  9. 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
  10. val deltaLog: DeltaLog
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. val finalIsBlindAppend: Boolean
  13. val finalNeedsCheckpoint: Boolean
  14. val finalPartitionsAddedToOpt: Option[HashSet[Map[String, String]]]
  15. val finalTxnExecutionTimeMs: Long
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  17. def getCommonTags(deltaLog: DeltaLog, tahoeId: String): Map[TagDefinition, String]
    Definition Classes
    DeltaLogging
  18. def getErrorData(e: Throwable): Map[String, Any]
    Definition Classes
    DeltaLogging
  19. 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
  20. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  21. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  22. 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
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  25. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  26. def logConsole(line: String): Unit
    Definition Classes
    DatabricksLogging
  27. def logDebug(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  28. def logDebug(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  29. def logDebug(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  30. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  31. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  32. def logError(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  33. def logError(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  34. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  35. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  36. def logInfo(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  37. def logInfo(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  38. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  39. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  40. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  41. def logTrace(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  42. def logTrace(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  43. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  44. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  45. def logWarning(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  46. def logWarning(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  47. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  48. 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
  49. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  50. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  51. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  52. 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
  53. val postCommitHooks: Seq[PostCommitHook]
  54. val postCommitSnapshot: Snapshot
  55. def productElementNames: Iterator[String]
    Definition Classes
    Product
  56. 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
  57. 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 deltaLog is null.

    Attributes
    protected
    Definition Classes
    DeltaLogging
  58. 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
  59. 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
  60. def recordEvent(metric: MetricDefinition, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, trimBlob: Boolean = true): Unit
    Definition Classes
    DatabricksLogging
  61. def recordFrameProfile[T](group: String, name: String)(thunk: => T): T
    Attributes
    protected
    Definition Classes
    DeltaLogging
  62. 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
  63. def recordProductEvent(metric: MetricDefinition with CentralizableMetric, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, trimBlob: Boolean = true): Unit
    Definition Classes
    DatabricksLogging
  64. 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
  65. 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
  66. 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
  67. 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
  68. val snapshot: Snapshot
  69. def spark: SparkSession

    The current spark session

    The current spark session

    Attributes
    protected
    Definition Classes
    DeltaTransaction
  70. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  71. 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
  72. val txnId: String

    Unique identifier for the transaction

    Unique identifier for the transaction

    Definition Classes
    CommittedTransaction → DeltaTransaction
  73. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  74. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  75. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  76. def withLogContext(context: Map[String, String])(body: => Unit): Unit
    Attributes
    protected
    Definition Classes
    Logging
  77. 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

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from DeltaTransaction

Inherited from DeltaLogging

Inherited from DatabricksLogging

Inherited from DeltaProgressReporter

Inherited from LoggingShims

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped