[
https://issues.apache.org/jira/browse/BEAM-10303?focusedWorklogId=451792&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-451792
]
ASF GitHub Bot logged work on BEAM-10303:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 26/Jun/20 23:13
Start Date: 26/Jun/20 23:13
Worklog Time Spent: 10m
Work Description: lukecwik commented on a change in pull request #12093:
URL: https://github.com/apache/beam/pull/12093#discussion_r446447782
##########
File path:
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java
##########
@@ -637,6 +737,28 @@ private void processElementForParDo(WindowedValue<InputT>
elem) {
}
private void processElementForPairWithRestriction(WindowedValue<InputT>
elem) {
+ currentElement = elem;
+ try {
+ currentRestriction =
doFnInvoker.invokeGetInitialRestriction(processContext);
+ outputTo(
+ mainOutputConsumers,
+ (WindowedValue)
+ elem.withValue(
+ KV.of(
+ elem.getValue(),
+ KV.of(
+ currentRestriction,
+
doFnInvoker.invokeGetInitialWatermarkEstimatorState(processContext)))));
+ } finally {
+ currentElement = null;
+ currentRestriction = null;
Review comment:
It is never set/utilized in these methods and just remains null. All
output is produced using the entire set of windows for the current element
instead.
The window observing versions of these methods do set it and clear it.
----------------------------------------------------------------
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: 451792)
Time Spent: 1h 10m (was: 1h)
> FnApiDoFnRunner window observing optimization
> ---------------------------------------------
>
> Key: BEAM-10303
> URL: https://issues.apache.org/jira/browse/BEAM-10303
> Project: Beam
> Issue Type: Improvement
> Components: sdk-java-harness
> Reporter: Luke Cwik
> Assignee: Luke Cwik
> Priority: P2
> Labels: portability
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Currently the FnApiDoFnRunner processes each element within it's own window.
> There is an easy optimization where we process the element once if and only
> if the function doesn't observe the window (either directly or indirectly via
> side inputs/state/...).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)