[ https://issues.apache.org/jira/browse/BEAM-9265?focusedWorklogId=386453&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-386453 ]
ASF GitHub Bot logged work on BEAM-9265: ---------------------------------------- Author: ASF GitHub Bot Created on: 13/Feb/20 09:02 Start Date: 13/Feb/20 09:02 Worklog Time Spent: 10m Work Description: dmvk commented on pull request #10795: [BEAM-9265] @RequiresTimeSortedInput respects allowedLateness URL: https://github.com/apache/beam/pull/10795#discussion_r378724102 ########## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java ########## @@ -2409,6 +2410,39 @@ public void testRequiresTimeSortedInputWithTestStream() { testTimeSortedInput(numElements, pipeline.apply(stream.advanceWatermarkToInfinity())); } + @Test + @Category({ + ValidatesRunner.class, + UsesStatefulParDo.class, + UsesRequiresTimeSortedInput.class, + UsesStrictTimerOrdering.class, + UsesTestStream.class + }) + public void testRequiresTimeSortedInputWithLateDataAndAllowedLateness() { + // generate list long enough to rule out random shuffle in sorted order + int numElements = 1000; + List<Long> eventStamps = + LongStream.range(0, numElements) + .mapToObj(i -> numElements - i) + .collect(Collectors.toList()); + TestStream.Builder<Long> input = TestStream.create(VarLongCoder.of()); + for (Long stamp : eventStamps) { + input = input.addElements(TimestampedValue.of(stamp, Instant.ofEpochMilli(stamp))); + if (stamp == 100) { + // advance watermark when we have 100 remaining elements Review comment: 900 remaining elements? ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 386453) Time Spent: 2h 50m (was: 2h 40m) > @RequiresTimeSortedInput does not respect allowedLateness > --------------------------------------------------------- > > Key: BEAM-9265 > URL: https://issues.apache.org/jira/browse/BEAM-9265 > Project: Beam > Issue Type: Bug > Components: sdk-java-core > Affects Versions: 2.20.0 > Reporter: Jan Lukavský > Assignee: Jan Lukavský > Priority: Major > Fix For: 2.20.0 > > Time Spent: 2h 50m > Remaining Estimate: 0h > > Currently, @RequiresTimeSortedInput drops data with respect to > allowedLateness, but timers are triggered without respecting it. We have to: > - drop data that is too late (after allowedLateness) > - setup timer for _minTimestamp + allowedLateness_ > - hold output watermark at _minTimestamp_ -- This message was sent by Atlassian Jira (v8.3.4#803005)