You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/03 16:15:12 UTC

[GitHub] [beam] kennknowles opened a new issue, #18065: Primitive to shift the watermark while assigning timestamps

kennknowles opened a new issue, #18065:
URL: https://github.com/apache/beam/issues/18065

   There is a general need, especially important in the presence of SplittableDoFn, to be able to assign new timestamps to elements without making them late or droppable.
   
    - DoFn.withAllowedTimestampSkew is inadequate, because it simply allows one to produce late data, but does not allow one to shift the watermark so the new data is on-time.
    - For a SplittableDoFn, one may receive an element such as the name of a log file that contains elements for the day preceding the log file. The timestamp on the filename must currently be the beginning of the log. If such elements are constantly flowing, it may be OK, but since we don't know that element is coming, in that absence of data, the watermark may advance. We need a way to keep it far enough back even in the absence of data holding it back.
   
   One idea is a new primitive ShiftWatermark / AdjustTimestamps with the following pieces:
   
    - A constant duration (positive or negative) D by which to shift the watermark.
    - A function from TimestampedElement<T\> to new timestamp that is \>= t **** D
   
   So, for example, AdjustTimestamps(<-60 minutes\>, f) would allow f to make timestamps up to 60 minutes earlier.
   
   With this primitive added, outputWithTimestamp and withAllowedTimestampSkew could be removed, simplifying DoFn.
   
   Alternatively, all of this functionality could be bolted on to DoFn.
   
   This ticket is not a proposal, but a record of the issue and ideas that were mentioned.
   
   Imported from Jira [BEAM-644](https://issues.apache.org/jira/browse/BEAM-644). Original Jira may contain additional context.
   Reported by: kenn.


-- 
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: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org