T
- Type of the values folded into the stateACC
- Type of the value in the state@PublicEvolving public interface FoldingState<T,ACC> extends AppendingState<T,ACC>
State
interface for folding state. Elements can be added to the state, they will
be successively added to the initial value using a
FoldFunction
. The current state can be inspected.
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 KeyedDataStream. 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.
add, get
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.