mxm commented on a change in pull request #12759:
URL: https://github.com/apache/beam/pull/12759#discussion_r484498723
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/state/FlinkStateInternals.java
##########
@@ -139,17 +163,27 @@ private FlinkStateBinder(StateNamespace namespace,
StateContext<?> stateContext)
@Override
public <T2> ValueState<T2> bindValue(
String id, StateSpec<ValueState<T2>> spec, Coder<T2> coder) {
- return new FlinkValueState<>(flinkStateBackend, id, namespace, coder);
+ ValueStateDescriptor<T2> valueStateDescriptor =
+ new ValueStateDescriptor<>(id, new CoderTypeSerializer<>(coder));
+ globalWindowStateDescriptors.add(valueStateDescriptor);
+ return new FlinkValueState<>(flinkStateBackend, id, namespace,
valueStateDescriptor);
}
@Override
public <T2> BagState<T2> bindBag(String id, StateSpec<BagState<T2>> spec,
Coder<T2> elemCoder) {
- return new FlinkBagState<>(flinkStateBackend, id, namespace, elemCoder);
+ ListStateDescriptor<T2> listStateDescriptor =
+ new ListStateDescriptor<>(id, new CoderTypeSerializer<>(elemCoder));
+ globalWindowStateDescriptors.add(listStateDescriptor);
Review comment:
Changed reverted.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]