exists: Boolean
GroupState — Group State in Arbitrary Stateful Streaming Aggregation
GroupState
is an abstraction of group state (of type S
) in Arbitrary Stateful Streaming Aggregation.
GroupState
is used with the following KeyValueGroupedDataset operations:
GroupState
is created separately for every aggregation key to hold a state as an aggregation state value.
Method | Description |
---|---|
|
|
|
Gets the state value if it exists or throws a |
|
Gets the current processing time (as milliseconds in epoch time) |
|
Gets the current event time watermark (as milliseconds in epoch time) |
|
Gets the state value as a Scala Used when:
|
|
Whether the state (for a given key) has timed out or not. Can only be |
|
Removes the state |
|
Specifies the timeout duration for the state key (in millis or as a string, e.g. "10 seconds", "1 hour") for GroupStateTimeout.ProcessingTimeTimeout |
|
Specifies the timeout timestamp for the state key for GroupStateTimeout.EventTimeTimeout |
|
Updates the state (sets the state to a new value) |
Note
|
GroupStateImpl is the default and only known implementation of the GroupState Contract in Spark Structured Streaming. |