lukecwik commented on a change in pull request #16458:
URL: https://github.com/apache/beam/pull/16458#discussion_r781503752
##########
File path:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java
##########
@@ -1720,6 +1736,23 @@ public Object restriction() {
doFnInvoker.invokeOnTimer(timerId, timerFamilyId, onTimerContext);
}
+ private <K> void processOnWindowExpiration(Timer<K> timer) {
+ try {
+ currentKey = timer.getUserKey();
+ currentTimer = timer;
+ Iterator<BoundedWindow> windowIterator =
Review comment:
currentWindow is defined outside of the method. I believe for-each loops
are limited to defining the variable within the `for (...)` so I can't do `for
(currentWindow : timer.getWindows()) { ... }`
##########
File path:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java
##########
@@ -1720,6 +1736,23 @@ public Object restriction() {
doFnInvoker.invokeOnTimer(timerId, timerFamilyId, onTimerContext);
}
+ private <K> void processOnWindowExpiration(Timer<K> timer) {
+ try {
+ currentKey = timer.getUserKey();
+ currentTimer = timer;
+ Iterator<BoundedWindow> windowIterator =
Review comment:
`currentWindow` is defined outside of the method. I believe for-each
loops are limited to defining the variable within the `for (...)` so I can't do
`for (currentWindow : timer.getWindows()) { ... }`
--
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]