You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/10/15 07:38:06 UTC

[GitHub] florianschmidt1994 opened a new pull request #6843: [FLINK-8482][DataStream] Allow users to choose from different timestamp strategies for interval join

florianschmidt1994 opened a new pull request #6843: [FLINK-8482][DataStream] Allow users to choose from different timestamp strategies for interval join
URL: https://github.com/apache/flink/pull/6843
 
 
   ## What is the purpose of the change
   
   This change will allow users to choose from different timestamp strategies when using the IntervalJoin in the DataStream API. A timestamp strategy defines which timestamp gets assigned to two elements that are joined together. 
   
   The usage in the API looks as follows
   
   ```
   leftKeyedStream.intervalJoin(rightKeyedStream)
           .between(<Time>, <Time>)
           .assignLeftTimestamp()
           .process(<ProcessJoinFunction>)
   ``` 
   
   The possible options to pick from are
   - `assignLeftTimestamp()`:
   - `assignRightTimestamp()`
   - `assignMinTimestamp()`
   - `assignMaxTimestamp()`
   
   In certain scenarios the watermark emitted by the IntervalJoinOperator needs to be delayed, in order to not produce any late data. This is only necessary when choosing `assignMinTimestamp()` or for certain combinations of upper / lower bound and `assignRightTimestamp()` / `assignLeftTimestamp()`. It is never necessary when using `assignMaxTimestamp()`.
   
   Delaying watermarks is implemented by subtracting the necessary delay from each incoming watermarks timestamp before emitting it. Note that this only takes effect with respect to downstream operators. The internal timerservice will still be advanced by the original watermark, so that timers (including those defined by the user) will still be fired with respect to the original watermark.
   
   ## Brief change log
     - Implement timestamp strategies in IntervalJoinOperator
     - Add to Scala DataStream API
     - Add to Java DataStream API
     - Add test cases to IntervalJoinITCase (both java & scala)
   
   ## Verifying this change
     - Extends integration tests in IntervalJoinITCase
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: yes
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): yes
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? yes
     - If yes, how is the feature documented? JavaDocs
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services