[
https://issues.apache.org/jira/browse/BEAM-1819?focusedWorklogId=427737&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-427737
]
ASF GitHub Bot logged work on BEAM-1819:
----------------------------------------
Author: ASF GitHub Bot
Created on: 27/Apr/20 17:50
Start Date: 27/Apr/20 17:50
Worklog Time Spent: 10m
Work Description: lukecwik commented on a change in pull request #11154:
URL: https://github.com/apache/beam/pull/11154#discussion_r416023080
##########
File path:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java
##########
@@ -560,7 +560,6 @@ public Instant timestamp(DoFn<InputT, OutputT> doFn) {
throw new IllegalStateException(
String.format("Unknown URN %s", pTransform.getSpec().getUrn()));
}
- this.onTimerContext = new OnTimerContext();
Review comment:
The intent of these context objects was to not create a new one when
processing each element/timer and instead to reference a member variable as can
be seen in:
https://github.com/apache/beam/blob/591de3473144de54beef0932131025e2a4d8504b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java#L1468
https://github.com/apache/beam/blob/591de3473144de54beef0932131025e2a4d8504b/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java#L1506
It would have made more sense to have OnTimerContext just return
`currentTimer.getUserKey()`
----------------------------------------------------------------
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: 427737)
Time Spent: 31h (was: 30h 50m)
> 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: 31h
> 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)