[
https://issues.apache.org/jira/browse/BEAM-1819?focusedWorklogId=416070&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-416070
]
ASF GitHub Bot logged work on BEAM-1819:
----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Apr/20 22:37
Start Date: 04/Apr/20 22:37
Worklog Time Spent: 10m
Work Description: reuvenlax commented on 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]
Issue Time Tracking
-------------------
Worklog Id: (was: 416070)
Time Spent: 15h 20m (was: 15h 10m)
> Key should be available in @OnTimer methods
> -------------------------------------------
>
> Key: BEAM-1819
> URL: https://issues.apache.org/jira/browse/BEAM-1819
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Reporter: Thomas Groh
> Assignee: Shehzaad Nakhoda
> Priority: Major
> Time Spent: 15h 20m
> Remaining Estimate: 0h
>
> Every timer firing has an associated key. This key should be available when
> the timer is delivered to a user's {{DoFn}}, so they don't have to store it
> in state.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)