Packages

trait Transaction extends Closeable

Represents a transaction.

Spark begins a transaction with TransactionalCatalogPlugin#beginTransaction and executes read/write operations against the transaction's catalog. On success, Spark calls #commit(); on failure, Spark calls #abort(). In both cases Spark subsequently calls #close() to release resources.

Annotations
@Evolving()
Source
Transaction.java
Since

4.2.0

Linear Supertypes
Closeable, AutoCloseable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Transaction
  2. Closeable
  3. AutoCloseable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def abort(): Unit

    Aborts the transaction, discarding any staged changes.

    Aborts the transaction, discarding any staged changes.

    This method must be idempotent. If the transaction has already been committed or aborted, invoking it must have no effect.

    Spark calls #close() immediately after this method returns.

  2. abstract def catalog(): CatalogPlugin

    Returns the catalog associated with this transaction.

    Returns the catalog associated with this transaction. This catalog is responsible for tracking read/write operations that occur within the boundaries of a transaction. This allows connectors to perform conflict resolution at commit time.

  3. abstract def close(): Unit

    Releases any resources held by this transaction.

    Releases any resources held by this transaction.

    Spark always calls this method after #commit() or #abort(), regardless of whether those methods succeed or not.

    This method must be idempotent. If the transaction has already been closed, invoking it must have no effect.

    Definition Classes
    Transaction → Closeable → AutoCloseable
    Annotations
    @Override()
  4. abstract def commit(): Unit

    Commits the transaction.

    Commits the transaction. All writes performed under it become visible to other readers.

    The connector is responsible for detecting and resolving conflicting commits or throwing an exception if resolution is not possible.

    This method will be called exactly once per transaction. Spark calls #close() immediately after this method returns.

    Exceptions thrown

    IllegalStateException if the transaction has already been committed or aborted.

  5. abstract def registerScans(scans: Array[Scan]): Boolean

    Attempts to register materialized scans against this transaction's read set.

    Attempts to register materialized scans against this transaction's read set.

    An example use case is cache reuse. Spark passes the scans of a candidate cached subtree for the transaction's catalog and the connector decides whether to accept them.

    The connector must either accept all passed scans (returning true after adding the scans to the read set) or refuse (returning false without modifying the read set).

    scans

    the materialized scans Spark offers for registration against this transaction's read set.

    returns

    true if the connector accepts the scans; false otherwise.

Concrete 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. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

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 Closeable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped