[
https://issues.apache.org/jira/browse/BEAM-9430?focusedWorklogId=432955&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-432955
]
ASF GitHub Bot logged work on BEAM-9430:
----------------------------------------
Author: ASF GitHub Bot
Created on: 14/May/20 02:07
Start Date: 14/May/20 02:07
Worklog Time Spent: 10m
Work Description: lukecwik commented on a change in pull request #11607:
URL: https://github.com/apache/beam/pull/11607#discussion_r424830228
##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/Read.java
##########
@@ -537,6 +538,12 @@ public Instant
getInitialWatermarkEstimatorState(@Timestamp Instant currentEleme
@NewWatermarkEstimator
public WatermarkEstimators.Manual newWatermarkEstimator(
@WatermarkEstimatorState Instant watermarkEstimatorState) {
+ // Making sure that the watermark is within bounds.
+ if (watermarkEstimatorState.isBefore(BoundedWindow.TIMESTAMP_MIN_VALUE))
{
+ watermarkEstimatorState = BoundedWindow.TIMESTAMP_MIN_VALUE;
+ } else if
(watermarkEstimatorState.isAfter(BoundedWindow.TIMESTAMP_MAX_VALUE)) {
+ watermarkEstimatorState = BoundedWindow.TIMESTAMP_MAX_VALUE;
+ }
Review comment:
I was thinking that this logic would be where we call setWatermark above
on line 510
Note that the initial watermark estimate state is current element timestamp
which is always between MIN and MAX timestamp values.
----------------------------------------------------------------
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: 432955)
Time Spent: 7h 50m (was: 7h 40m)
> Migrate from ProcessContext#updateWatermark to WatermarkEstimators
> ------------------------------------------------------------------
>
> Key: BEAM-9430
> URL: https://issues.apache.org/jira/browse/BEAM-9430
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-java-core
> Reporter: Luke Cwik
> Assignee: Luke Cwik
> Priority: Major
> Labels: backward-incompatible
> Fix For: 2.21.0
>
> Time Spent: 7h 50m
> Remaining Estimate: 0h
>
> Current discussion underway in
> [https://lists.apache.org/thread.html/r5d974b6a58bc04ff4c02682fda4ef68608121f1bf23a86e9d592ca6e%40%3Cdev.beam.apache.org%3E]
>
> Proposed API: [https://github.com/apache/beam/pull/10992]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)