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

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

                Author: ASF GitHub Bot
            Created on: 30/Sep/21 22:48
            Start Date: 30/Sep/21 22:48
    Worklog Time Spent: 10m 
      Work Description: laraschmidt commented on a change in pull request 
#15540:
URL: https://github.com/apache/beam/pull/15540#discussion_r719816647



##########
File path: 
runners/core-java/src/test/java/org/apache/beam/runners/core/SimpleDoFnRunnerTest.java
##########
@@ -472,6 +659,40 @@ public Duration getAllowedTimestampSkew() {
     }
   }
 
+  /**
+   * A {@link DoFn} that creates/sets a timer with an output timestamp equal 
to the input timestamp
+   * minus the input element's value. Keys are ignored but required for timers.
+   */
+  private static class TimerSkewingDoFn extends DoFn<KV<String, Duration>, 
Duration> {
+    static final String TIMER_ID = "testTimerFamily";
+    private final Duration allowedSkew;
+
+    @TimerFamily(TIMER_ID)
+    private final TimerSpec timers = 
TimerSpecs.timerMap(TimeDomain.PROCESSING_TIME);

Review comment:
       The elements need to share a timer then but I suppose the same logic 
will hit whenever we set the output timestamp. I removed the output of elements 
though since this would be harder. Wasn't really needed anyway.




-- 
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 658644)
    Time Spent: 1h 20m  (was: 1h 10m)

> Timer.setOutputTimestamp doesn't take into account for 
> DoFn#getAllowedTimestampSkew()
> -------------------------------------------------------------------------------------
>
>                 Key: BEAM-12931
>                 URL: https://issues.apache.org/jira/browse/BEAM-12931
>             Project: Beam
>          Issue Type: Bug
>          Components: beam-model
>            Reporter: Lara Schmidt
>            Assignee: Lara Schmidt
>            Priority: P2
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> A DoFn may emit elements with a timestamp up to 
> DoFn#getAllowedTimestampSkew() before the current element's timestamp. 
> However getAllowedTimestampSkew is not properly accounted for in looking at 
> the output timestamp of a timer.
> Context: 
> [https://lists.apache.org/thread.html/r7554658114ddde86c5d82e1c39fe7e1ef587fe926b8e406d1130d501%40%3Cdev.beam.apache.org%3E]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to