reuvenlax commented on a change in pull request #11154: [BEAM-1819] Key should
be available in @OnTimer methods
URL: https://github.com/apache/beam/pull/11154#discussion_r403549672
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/stableinput/BufferingDoFnRunner.java
##########
@@ -125,8 +129,8 @@ public void processElement(WindowedValue<InputT> elem) {
Instant outputTimestamp,
TimeDomain timeDomain) {
currentBufferingElementsHandler.buffer(
- new BufferedElements.Timer(
- timerId, timerFamilyId, window, timestamp, outputTimestamp,
timeDomain));
+ new BufferedElements.Timer<>(
+ timerId, timerFamilyId, key, window, timestamp, outputTimestamp,
timeDomain));
Review comment:
On a closer look, I think adding to the Coder is the wrong way to preserve
the key. DoFnOperator has a stateInternals() which should provide access to the
current key, and that way we don't have to encode the key again.
Sorry for the bad suggestion.
----------------------------------------------------------------
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]
With regards,
Apache Git Services