Packages

trait StateStore extends ReadStateStore

Base trait for a versioned key-value store which provides both read and write operations. Each instance of a StateStore represents a specific version of state data, and such instances are created through a StateStoreProvider.

Unlike ReadStateStore, abort method may not be called if the commit method succeeds to commit the change. (hasCommitted returns true.) Otherwise, abort method will be called. Implementation should deal with resource cleanup in both methods, and also need to guard with double resource cleanup.

Linear Supertypes
ReadStateStore, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StateStore
  2. ReadStateStore
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def abort(): Unit

    Abort all the updates that have been made to the store.

    Abort all the updates that have been made to the store. Implementations should ensure that no more updates (puts, removes) can be after an abort in order to avoid incorrect usage.

    Definition Classes
    StateStoreReadStateStore
  2. abstract def commit(): Long

    Commit all the updates that have been made to the store, and return the new version.

    Commit all the updates that have been made to the store, and return the new version. Implementations should ensure that no more updates (puts, removes) can be after a commit in order to avoid incorrect usage.

  3. abstract def get(key: UnsafeRow): UnsafeRow

    Get the current value of a non-null key.

    Get the current value of a non-null key.

    returns

    a non-null row if the key exists in the store, otherwise null.

    Definition Classes
    ReadStateStore
  4. abstract def hasCommitted: Boolean

    Whether all updates have been committed

  5. abstract def id: StateStoreId

    Unique identifier of the store

    Unique identifier of the store

    Definition Classes
    ReadStateStore
  6. abstract def iterator(): Iterator[UnsafeRowPair]

    Return an iterator containing all the key-value pairs in the StateStore.

    Return an iterator containing all the key-value pairs in the StateStore. Implementations must ensure that updates (puts, removes) can be made while iterating over this iterator.

    Definition Classes
    StateStoreReadStateStore
  7. abstract def metrics: StateStoreMetrics

    Current metrics of the state store

  8. abstract def prefixScan(prefixKey: UnsafeRow): Iterator[UnsafeRowPair]

    Return an iterator containing all the key-value pairs which are matched with the given prefix key.

    Return an iterator containing all the key-value pairs which are matched with the given prefix key.

    The operator will provide numColsPrefixKey greater than 0 in StateStoreProvider.init method if the operator needs to leverage the "prefix scan" feature. The schema of the prefix key should be same with the leftmost numColsPrefixKey columns of the key schema.

    It is expected to throw exception if Spark calls this method without setting numColsPrefixKey to the greater than 0.

    Definition Classes
    ReadStateStore
  9. abstract def put(key: UnsafeRow, value: UnsafeRow): Unit

    Put a new non-null value for a non-null key.

    Put a new non-null value for a non-null key. Implementations must be aware that the UnsafeRows in the params can be reused, and must make copies of the data as needed for persistence.

  10. abstract def remove(key: UnsafeRow): Unit

    Remove a single non-null key.

  11. abstract def version: Long

    Version of the data in this store before committing updates.

    Version of the data in this store before committing updates.

    Definition Classes
    ReadStateStore

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( ... ) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  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
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  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( ... )
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

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

Inherited from ReadStateStore

Inherited from AnyRef

Inherited from Any

Ungrouped