[ 
https://issues.apache.org/jira/browse/BEAM-3869?focusedWorklogId=81440&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-81440
 ]

ASF GitHub Bot logged work on BEAM-3869:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Mar/18 23:56
            Start Date: 16/Mar/18 23:56
    Worklog Time Spent: 10m 
      Work Description: lukecwik closed pull request #4883: [BEAM-3869] Fix Go 
Dataflow break due to zero timestamps
URL: https://github.com/apache/beam/pull/4883
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/sdks/go/pkg/beam/core/runtime/exec/coder.go 
b/sdks/go/pkg/beam/core/runtime/exec/coder.go
index 504f6e6a868..e41be11f94f 100644
--- a/sdks/go/pkg/beam/core/runtime/exec/coder.go
+++ b/sdks/go/pkg/beam/core/runtime/exec/coder.go
@@ -282,6 +282,9 @@ func (c *kvDecoder) Decode(r io.Reader) (FullValue, error) {
 func EncodeWindowedValueHeader(c *coder.Coder, t typex.EventTime, w io.Writer) 
error {
        // Encoding: Timestamp, Window, Pane (header) + Element
 
+       if (time.Time)(t).IsZero() {
+               t = typex.EventTime(time.Now())
+       }
        if err := coder.EncodeEventTime(t, w); err != nil {
                return err
        }
diff --git a/sdks/go/pkg/beam/runners/dataflow/translate.go 
b/sdks/go/pkg/beam/runners/dataflow/translate.go
index aae0654b082..17948e080e5 100644
--- a/sdks/go/pkg/beam/runners/dataflow/translate.go
+++ b/sdks/go/pkg/beam/runners/dataflow/translate.go
@@ -309,7 +309,7 @@ func translateEdge(edge *graph.MultiEdge) (string, 
properties, error) {
                // URL Query-escaped windowed _unnested_ value. It is read back 
in
                // a nested context at runtime.
                var buf bytes.Buffer
-               if err := exec.EncodeWindowedValueHeader(c, 
beam.EventTime(time.Time{}), &buf); err != nil {
+               if err := exec.EncodeWindowedValueHeader(c, 
beam.EventTime(time.Now()), &buf); err != nil {
                        return "", properties{}, err
                }
                value := string(append(buf.Bytes(), edge.Value...))


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 81440)
    Time Spent: 0.5h  (was: 20m)

> Go Dataflow jobs fail with EventTime error
> ------------------------------------------
>
>                 Key: BEAM-3869
>                 URL: https://issues.apache.org/jira/browse/BEAM-3869
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-go
>            Reporter: Henning Rohde
>            Assignee: Henning Rohde
>            Priority: Critical
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Suspect that the stricter checking in 
> https://github.com/apache/beam/pull/4843 for the join example:
> 2018/03/16 15:28:30 Failed to execute job: received a zero EventTime, which 
> is unencodable



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to