Packages

class StateTypesEncoder[V] extends AnyRef

Helper class providing APIs to encode the grouping key, and user provided values to Spark UnsafeRow.

CAUTION: StateTypesEncoder class instance is *not* thread-safe. This class reuses the keyProjection and valueProjection for encoding grouping key and state value respectively. As UnsafeProjection is not thread safe, this class is also not thread safe.

V

- value type

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StateTypesEncoder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new StateTypesEncoder(keyEncoder: ExpressionEncoder[Any], valEncoder: Encoder[V], stateName: String, hasTtl: Boolean)

    keyEncoder

    - SQL encoder for the grouping key, key type is implicit

    valEncoder

    - SQL encoder for value of type S

    stateName

    - name of logical state partition

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. def decodeTtlExpirationMs(row: UnsafeRow): Option[Long]

    Decode the ttl information out of Value row.

    Decode the ttl information out of Value row. If the ttl has not been set (-1L specifies no user defined value), the API will return None.

  7. def decodeValue(row: UnsafeRow): V
  8. def encodeGroupingKey(): UnsafeRow
  9. def encodeValue(value: V, expirationMs: Long): UnsafeRow

    Encode the specified value in Spark UnsafeRow with provided ttl expiration.

  10. def encodeValue(value: V): UnsafeRow

    Encode the specified value in Spark UnsafeRow with no ttl.

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  15. def isExpired(row: UnsafeRow, batchTimestampMs: Long): Boolean
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. 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 AnyRef

Inherited from Any

Ungrouped