[ 
https://issues.apache.org/jira/browse/FLINK-3428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15179772#comment-15179772
 ] 

ASF GitHub Bot commented on FLINK-3428:
---------------------------------------

Github user kl0u commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1764#discussion_r55020209
  
    --- Diff: 
flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/DataStream.scala
 ---
    @@ -750,6 +750,34 @@ class DataStream[T](stream: JavaStream[T]) {
       }
     
       /**
    +    * Assigns timestamps to the elements in the data stream and 
periodically creates
    +    * watermarks to signal event time progress.
    +    *
    +    * This method is used for cases where the programmer wants the 
Watermarks emitted in
    +    * the stream to lag behind the maximum timestamp seen so far by a 
fixed period of time.
    +    *
    +    * For more general cases, use the general methods
    +    * [[assignTimestampsAndWatermarks(AssignerWithPeriodicWatermarks)]]
    +    * and 
[[assignTimestampsAndWatermarks(AssignerWithPunctuatedWatermarks)]].
    +    *
    +    * @param fixedWatermarkTrailingPeriod the fixed lag between the 
currently emitted
    +    *                                     watermark and the maximum 
timestamp seen so far.
    +    * @param extractor the method to extracts the timestamp from a given 
record.
    +    */
    +  @PublicEvolving
    +  def 
assignTimestampsWithAFixedPeriodTrailingWatermark(fixedWatermarkTrailingPeriod: 
Long,
    --- End diff --
    
    It is true, although I added it because there was already a method for the 
ascending one. If there is a consensus, I can remove it.


> Add fixed time trailing timestamp/watermark extractor
> -----------------------------------------------------
>
>                 Key: FLINK-3428
>                 URL: https://issues.apache.org/jira/browse/FLINK-3428
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Robert Metzger
>            Assignee: Klou
>
> Flink currently provides only one build-in timestamp extractor, which assumes 
> strictly ascending timestamps. In real world use cases, timestamps are almost 
> never strictly ascending.
> Therefore, I propose to provide an utility watermark extractor which is 
> generating watermarks with a fixed-time trailing.
> The implementation should keep track of the highest event-time seen so far 
> and subtract a fixed amount of time from that event time.
> This way, users can for example specify that the watermarks should always 
> "lag behind" 10 minutes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to