[
https://issues.apache.org/jira/browse/BEAM-11019?focusedWorklogId=495652&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-495652
]
ASF GitHub Bot logged work on BEAM-11019:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Oct/20 00:31
Start Date: 06/Oct/20 00:31
Worklog Time Spent: 10m
Work Description: lostluck commented on a change in pull request #13013:
URL: https://github.com/apache/beam/pull/13013#discussion_r499941678
##########
File path: sdks/go/pkg/beam/core/runtime/exec/sdf_test.go
##########
@@ -400,6 +400,90 @@ func TestAsSplittableUnit(t *testing.T) {
if err != nil {
t.Fatalf("invalid function: %v", err)
}
+ //wdfn, err := graph.NewDoFn(&VetWindowSdf{},
graph.NumMainInputs(graph.MainSingle))
Review comment:
rm commented out code.
##########
File path: sdks/go/pkg/beam/core/runtime/exec/sdf_test.go
##########
@@ -400,6 +400,90 @@ func TestAsSplittableUnit(t *testing.T) {
if err != nil {
t.Fatalf("invalid function: %v", err)
}
+ //wdfn, err := graph.NewDoFn(&VetWindowSdf{},
graph.NumMainInputs(graph.MainSingle))
+ //if err != nil {
+ // t.Fatalf("invalid function: %v", err)
+ //}
+ multiWindows := []typex.Window{
+ window.IntervalWindow{Start: 10, End: 20},
+ window.IntervalWindow{Start: 11, End: 21},
+ window.IntervalWindow{Start: 12, End: 22},
+ window.IntervalWindow{Start: 13, End: 23},
+ }
+
+ // Test that progress returns expected results and respects windows.
+ t.Run("Progress", func(t *testing.T) {
+ tests := []struct {
+ name string
+ fn *graph.DoFn
+ in FullValue
+ doneWork float64 // Will be output by RTracker's
GetProgress.
+ remainingWork float64 // Will be output by RTracker's
GetProgress.
+ currWindow int
+ wantProgress float64
+ }{
+ {
+ name: "SingleWindow",
+ fn: dfn,
+ in: FullValue{
+ Elm: &FullValue{
+ Elm: 1,
+ Elm2: &VetRestriction{ID:
"Sdf"},
+ },
+ Elm2: 1.0,
+ Timestamp: testTimestamp,
+ Windows: testWindows,
+ },
+ doneWork: 1.0,
+ remainingWork: 1.0,
+ currWindow: 0,
+ wantProgress: 0.5,
+ },
+ {
+ name: "MultipleWindows",
+ fn: dfn,
Review comment:
VetSdf doesn't observe windows (either explicitly or implicitly via side
input), so I'm not sure it checks the code?
----------------------------------------------------------------
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: 495652)
Time Spent: 50m (was: 40m)
> Adjust Go SDF progress reporting to account for multi-window elements.
> ----------------------------------------------------------------------
>
> Key: BEAM-11019
> URL: https://issues.apache.org/jira/browse/BEAM-11019
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-go
> Reporter: Daniel Oliveira
> Assignee: Daniel Oliveira
> Priority: P2
> Time Spent: 50m
> Remaining Estimate: 0h
>
> SDF progress reporting should account for exploded windows. For example, if
> an element being processed is in three windows, and those windows get
> exploded, then it essentially is being processed 3 times. So after the first
> window's done, progress should be at 1/3, then at 2/3 after the second, and
> so on. Instead, at the moment progress is only reported for the current
> element which means it'll constantly loop from 0 -> 1.0 over and over as the
> element gets processed in each window.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)