class StatefulProcessorHandleImpl extends StatefulProcessorHandleImplBase with Logging
Class that provides a concrete implementation of a StatefulProcessorHandle. Note that we keep track of valid transitions as various functions are invoked to track object lifecycle.
- Alphabetic
- By Inheritance
- StatefulProcessorHandleImpl
- Logging
- StatefulProcessorHandleImplBase
- StatefulProcessorHandle
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new StatefulProcessorHandleImpl(store: StateStore, runId: UUID, keyEncoder: ExpressionEncoder[Any], timeMode: TimeMode, isStreaming: Boolean = true, batchTimestampMs: Option[Long] = None, metrics: Map[String, SQLMetric] = Map.empty)
- store
- instance of state store
- runId
- unique id for the current run
- keyEncoder
- encoder for the key
- isStreaming
- defines whether the query is streaming or batch
- batchTimestampMs
- timestamp for the current batch if available
- metrics
- metrics to be updated as part of stateful processing
Type Members
- implicit class LogStringContext extends AnyRef
- Definition Classes
- Logging
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()
- var currState: StatefulProcessorHandleState
- Attributes
- protected
- Definition Classes
- StatefulProcessorHandleImplBase
- def deleteIfExists(stateName: String): Unit
Function to delete and purge state variable if defined previously
Function to delete and purge state variable if defined previously
- stateName
- name of the state variable
- Definition Classes
- StatefulProcessorHandleImpl → StatefulProcessorHandle
- def deleteTimer(expiryTimestampMs: Long): Unit
Function to delete a timer for the given expiryTimestampMs
Function to delete a timer for the given expiryTimestampMs
- expiryTimestampMs
- timestamp in milliseconds for the timer to delete
- Definition Classes
- StatefulProcessorHandleImpl → StatefulProcessorHandle
- def doTtlCleanup(): Unit
Performs the user state cleanup based on assigned TTl values.
Performs the user state cleanup based on assigned TTl values. Any state which is expired will be cleaned up from StateStore.
- 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 getExpiredTimers(expiryTimestampMs: Long): Iterator[(Any, Long)]
Function to retrieve all expired registered timers for all grouping keys
Function to retrieve all expired registered timers for all grouping keys
- expiryTimestampMs
Threshold for expired timestamp in milliseconds, this function will return all timers that have timestamp less than passed threshold
- returns
- iterator of registered timers for all grouping keys
- def getHandleState: StatefulProcessorHandleState
- Definition Classes
- StatefulProcessorHandleImplBase
- def getListState[T](stateName: String, ttlConfig: TTLConfig)(implicit arg0: Encoder[T]): ListState[T]
- Definition Classes
- StatefulProcessorHandleImpl → StatefulProcessorHandle
- def getListState[T](stateName: String, valEncoder: Encoder[T], ttlConfig: TTLConfig): ListState[T]
Function to create new or return existing list state variable of given type with ttl.
Function to create new or return existing list state variable of given type with ttl. State values will not be returned past ttlDuration, and will be eventually removed from the state store. Any values in listState which have expired after ttlDuration will not returned on get() and will be eventually removed from the state.
The user must ensure to call this function only within the
init()method of the StatefulProcessor.- T
- type of state variable
- stateName
- name of the state variable
- valEncoder
- SQL encoder for state variable
- ttlConfig
- the ttl configuration (time to live duration etc.)
- returns
- instance of ListState of type T that can be used to store state persistently
- Definition Classes
- StatefulProcessorHandleImpl → StatefulProcessorHandle
- def getMapState[K, V](stateName: String, ttlConfig: TTLConfig)(implicit arg0: Encoder[K], arg1: Encoder[V]): MapState[K, V]
- Definition Classes
- StatefulProcessorHandleImpl → StatefulProcessorHandle
- def getMapState[K, V](stateName: String, userKeyEnc: Encoder[K], valEncoder: Encoder[V], ttlConfig: TTLConfig): MapState[K, V]
- Definition Classes
- StatefulProcessorHandleImpl → StatefulProcessorHandle
- def getQueryInfo(): QueryInfo
- Definition Classes
- StatefulProcessorHandleImpl → StatefulProcessorHandle
- def getValueState[T](stateName: String, ttlConfig: TTLConfig)(implicit arg0: Encoder[T]): ValueState[T]
- Definition Classes
- StatefulProcessorHandleImpl → StatefulProcessorHandle
- def getValueState[T](stateName: String, valEncoder: Encoder[T], ttlConfig: TTLConfig): ValueState[T]
- Definition Classes
- StatefulProcessorHandleImpl → StatefulProcessorHandle
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def listTimers(): Iterator[Long]
Function to list all the registered timers for given implicit key Note: calling listTimers() within the
handleInputRowsmethod of the StatefulProcessor will return all the unprocessed registered timers, including the one being fired within the invocation ofhandleInputRows.Function to list all the registered timers for given implicit key Note: calling listTimers() within the
handleInputRowsmethod of the StatefulProcessor will return all the unprocessed registered timers, including the one being fired within the invocation ofhandleInputRows.- returns
- iterator of all the registered timers for given implicit key
- Definition Classes
- StatefulProcessorHandleImpl → StatefulProcessorHandle
- def log: Logger
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logName: String
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(entry: LogEntry, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(entry: LogEntry): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- 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()
- def registerTimer(expiryTimestampMs: Long): Unit
Function to register a timer for the given expiryTimestampMs
Function to register a timer for the given expiryTimestampMs
- expiryTimestampMs
- timestamp in milliseconds for the timer to expire
- Definition Classes
- StatefulProcessorHandleImpl → StatefulProcessorHandle
- def setHandleState(newState: StatefulProcessorHandleState): Unit
- Definition Classes
- StatefulProcessorHandleImplBase
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def verifyStateVarOperations(operationType: String, requiredState: StatefulProcessorHandleState): Unit
- Definition Classes
- StatefulProcessorHandleImplBase
- def verifyTimerOperations(operationType: String): Unit
- Definition Classes
- StatefulProcessorHandleImplBase
- 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])
- def withLogContext(context: Map[String, String])(body: => Unit): Unit
- Attributes
- protected
- Definition Classes
- Logging
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)