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:
bindValue
in interfaceStateBinder
-
bindBag
- Specified by:
bindBag
in interfaceStateBinder
-
bindSet
- Specified by:
bindSet
in interfaceStateBinder
-
bindMap
public <KeyT,ValueT> MapState<KeyT,ValueT> bindMap(String id, StateSpec<MapState<KeyT, ValueT>> spec, Coder<KeyT> mapKeyCoder, Coder<ValueT> mapValueCoder) - Specified by:
bindMap
in interfaceStateBinder
-
bindOrderedList
public <T> OrderedListState<T> bindOrderedList(String id, StateSpec<OrderedListState<T>> spec, Coder<T> elemCoder) - Specified by:
bindOrderedList
in interfaceStateBinder
-
bindMultimap
public <KeyT,ValueT> MultimapState<KeyT,ValueT> bindMultimap(String id, StateSpec<MultimapState<KeyT, ValueT>> spec, Coder<KeyT> keyCoder, Coder<ValueT> valueCoder) - Specified by:
bindMultimap
in 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:
bindCombining
in 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:
bindCombiningWithContext
in interfaceStateBinder
-
bindWatermark
public WatermarkHoldState bindWatermark(String id, StateSpec<WatermarkHoldState> spec, TimestampCombiner timestampCombiner) Description copied from interface:StateBinder
Bind to a watermarkStateSpec
.This accepts the
TimestampCombiner
that dictates how watermark hold timestamps added to the returnedWatermarkHoldState
are to be combined.- Specified by:
bindWatermark
in interfaceStateBinder
-