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
- Alphabetic
- By Inheritance
- StateTypesEncoder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- 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
- 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
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- 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.
- def decodeValue(row: UnsafeRow): V
- def encodeGroupingKey(): UnsafeRow
- def encodeValue(value: V, expirationMs: Long): UnsafeRow
Encode the specified value in Spark UnsafeRow with provided ttl expiration.
- def encodeValue(value: V): UnsafeRow
Encode the specified value in Spark UnsafeRow with no ttl.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def isExpired(row: UnsafeRow, batchTimestampMs: Long): Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)