Class FlinkStateInternals.EarlyBinder
java.lang.Object
org.apache.beam.runners.flink.translation.wrappers.streaming.state.FlinkStateInternals.EarlyBinder
- All Implemented Interfaces:
StateBinder
- Enclosing class:
FlinkStateInternals<K>
Eagerly create user state to work around https://jira.apache.org/jira/browse/FLINK-12653.
-
Constructor Summary
ConstructorsConstructorDescriptionEarlyBinder(org.apache.flink.runtime.state.KeyedStateBackend keyedStateBackend, org.apache.beam.runners.core.construction.SerializablePipelineOptions pipelineOptions, Coder<? extends BoundedWindow> windowCoder) -
Method Summary
Modifier and TypeMethodDescription<T> BagState<T> <InputT,AccumT, OutputT>
CombiningState<InputT, AccumT, OutputT> bindCombining(String id, StateSpec<CombiningState<InputT, AccumT, OutputT>> spec, Coder<AccumT> accumCoder, Combine.CombineFn<InputT, AccumT, OutputT> combineFn) <InputT,AccumT, OutputT>
CombiningState<InputT, AccumT, OutputT> bindCombiningWithContext(String id, StateSpec<CombiningState<InputT, AccumT, OutputT>> spec, Coder<AccumT> accumCoder, CombineWithContext.CombineFnWithContext<InputT, AccumT, OutputT> combineFn) <KeyT,ValueT>
MapState<KeyT, ValueT> bindMap(String id, StateSpec<MapState<KeyT, ValueT>> spec, Coder<KeyT> mapKeyCoder, Coder<ValueT> mapValueCoder) <KeyT,ValueT>
MultimapState<KeyT, ValueT> bindMultimap(String id, StateSpec<MultimapState<KeyT, ValueT>> spec, Coder<KeyT> keyCoder, Coder<ValueT> valueCoder) <T> OrderedListState<T> bindOrderedList(String id, StateSpec<OrderedListState<T>> spec, Coder<T> elemCoder) <T> SetState<T> <T> ValueState<T> bindValue(String id, StateSpec<ValueState<T>> spec, Coder<T> coder) bindWatermark(String id, StateSpec<WatermarkHoldState> spec, TimestampCombiner timestampCombiner) Bind to a watermarkStateSpec.
-
Constructor Details
-
EarlyBinder
public EarlyBinder(org.apache.flink.runtime.state.KeyedStateBackend keyedStateBackend, org.apache.beam.runners.core.construction.SerializablePipelineOptions pipelineOptions, Coder<? extends BoundedWindow> windowCoder)
-
-
Method Details
-
bindValue
- Specified by:
bindValuein interfaceStateBinder
-
bindBag
- Specified by:
bindBagin interfaceStateBinder
-
bindSet
- Specified by:
bindSetin interfaceStateBinder
-
bindMap
public <KeyT,ValueT> MapState<KeyT,ValueT> bindMap(String id, StateSpec<MapState<KeyT, ValueT>> spec, Coder<KeyT> mapKeyCoder, Coder<ValueT> mapValueCoder) - Specified by:
bindMapin interfaceStateBinder
-
bindOrderedList
public <T> OrderedListState<T> bindOrderedList(String id, StateSpec<OrderedListState<T>> spec, Coder<T> elemCoder) - Specified by:
bindOrderedListin interfaceStateBinder
-
bindMultimap
public <KeyT,ValueT> MultimapState<KeyT,ValueT> bindMultimap(String id, StateSpec<MultimapState<KeyT, ValueT>> spec, Coder<KeyT> keyCoder, Coder<ValueT> valueCoder) - Specified by:
bindMultimapin interfaceStateBinder
-
bindCombining
public <InputT,AccumT, CombiningState<InputT,OutputT> AccumT, bindCombiningOutputT> (String id, StateSpec<CombiningState<InputT, AccumT, OutputT>> spec, Coder<AccumT> accumCoder, Combine.CombineFn<InputT, AccumT, OutputT> combineFn) - Specified by:
bindCombiningin interfaceStateBinder
-
bindCombiningWithContext
public <InputT,AccumT, CombiningState<InputT,OutputT> AccumT, bindCombiningWithContextOutputT> (String id, StateSpec<CombiningState<InputT, AccumT, OutputT>> spec, Coder<AccumT> accumCoder, CombineWithContext.CombineFnWithContext<InputT, AccumT, OutputT> combineFn) - Specified by:
bindCombiningWithContextin interfaceStateBinder
-
bindWatermark
public WatermarkHoldState bindWatermark(String id, StateSpec<WatermarkHoldState> spec, TimestampCombiner timestampCombiner) Description copied from interface:StateBinderBind to a watermarkStateSpec.This accepts the
TimestampCombinerthat dictates how watermark hold timestamps added to the returnedWatermarkHoldStateare to be combined.- Specified by:
bindWatermarkin interfaceStateBinder
-