@Experimental
@Evolving
public class GroupStateTimeout
extends Object
mapGroupsWithState
and flatMapGroupsWithState
.
See documentation on GroupState
for more details.
Constructor and Description |
---|
GroupStateTimeout() |
Modifier and Type | Method and Description |
---|---|
static GroupStateTimeout |
EventTimeTimeout()
Timeout based on event-time.
|
static GroupStateTimeout |
NoTimeout()
No timeout.
|
static GroupStateTimeout |
ProcessingTimeTimeout()
Timeout based on processing time.
|
public static GroupStateTimeout ProcessingTimeTimeout()
The duration of timeout can be set for each group in
map/flatMapGroupsWithState
by calling GroupState.setTimeoutDuration()
.
See documentation on GroupState
for more details.
public static GroupStateTimeout EventTimeTimeout()
The event-time timestamp for timeout can be set for each
group in map/flatMapGroupsWithState
by calling
GroupState.setTimeoutTimestamp()
.
In addition, you have to define the watermark in the query using
Dataset.withWatermark
.
When the watermark advances beyond the set timestamp of a group and the group has not
received any data, then the group times out.
See documentation on GroupState
for more details.
public static GroupStateTimeout NoTimeout()