Interface AggregatingState<IN,OUT>
-
- Type Parameters:
IN
- Type of the value added to the state.OUT
- Type of the value extracted from the state.
- All Superinterfaces:
AppendingState<IN,OUT>
,MergingState<IN,OUT>
,State
- All Known Subinterfaces:
InternalAggregatingState<K,N,IN,SV,OUT>
- All Known Implementing Classes:
ImmutableAggregatingState
@PublicEvolving public interface AggregatingState<IN,OUT> extends MergingState<IN,OUT>
State
interface for aggregating state, based on anAggregateFunction
. Elements that are added to this type of state will be eagerly pre-aggregated using a givenAggregateFunction
.The state holds internally always the accumulator type of the
AggregateFunction
. When accessing the result of the state, the function'sAggregateFunction.getResult(Object)
method.The state is accessed and modified by user functions, and checkpointed consistently by the system as part of the distributed snapshots.
The state is only accessible by functions applied on a
KeyedStream
. The key is automatically supplied by the system, so the function always sees the value mapped to the key of the current element. That way, the system can handle stream and state partitioning consistently together.
-
-
Method Summary
-
Methods inherited from interface org.apache.flink.api.common.state.AppendingState
add, get
-
-