alisha-1000 commented on code in PR #41519:
URL: https://github.com/apache/beam/pull/41519#discussion_r4693416219
##########
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/stableinput/BufferingDoFnRunner.java:
##########
@@ -80,9 +80,44 @@ public static <InputT, OutputT> BufferingDoFnRunner<InputT,
OutputT> create(
keyedStateBackend,
null,
null,
+ null,
null);
}
+ /**
+ * Like {@link #create(DoFnRunner, String, org.apache.beam.sdk.coders.Coder,
+ * org.apache.beam.sdk.coders.Coder, OperatorStateBackend,
KeyedStateBackend, int,
+ * SerializablePipelineOptions)}, but replayed timers get their key from
{@code timerKeySupplier}.
+ * The supplier is called while the keyed state backend is set to the key
the timer was buffered
+ * for. The buffered state does not contain the key of a timer.
+ */
+ public static <InputT, OutputT> BufferingDoFnRunner<InputT, OutputT> create(
+ DoFnRunner<InputT, OutputT> doFnRunner,
+ String stateName,
+ org.apache.beam.sdk.coders.Coder windowedInputCoder,
+ org.apache.beam.sdk.coders.Coder windowCoder,
+ OperatorStateBackend operatorStateBackend,
+ @Nullable KeyedStateBackend<Object> keyedStateBackend,
Review Comment:
Good point, thanks! Moved `keyedStateBackend` to the last parameter of the
new `create(...)` overload and updated all callers (DoFnOperator in
src/1.20/2.0/2.2 and BufferingDoFnRunnerTest). Done in d87b9c8.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]