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

    https://github.com/apache/flink/pull/2093#discussion_r66789406
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/WindowedStream.java
 ---
    @@ -121,6 +124,23 @@ public WindowedStream(KeyedStream<T, K> input,
        }
     
        /**
    +    * Sets the allowed lateness. If the {@link WindowAssigner} used
    +    * is in processing time, then the allowed lateness is set to 0.
    +    */
    +   @PublicEvolving
    +   public WindowedStream<T, K, W> setAllowedLateness(Time lateness) {
    +           long millis = lateness.toMilliseconds();
    +           if (allowedLateness < 0) {
    +                   throw new IllegalArgumentException("The allowed 
lateness cannot be negative.");
    +           } else if (allowedLateness != 0 && 
!windowAssigner.isEventTime()) {
    +                   this.allowedLateness = 0;
    --- End diff --
    
    LOG is more natural. There is no reason to stop the job for the user (as it 
is not an error). We should just tell him that 
    it does not make that much sense, so that he knows how to interpret the 
results he gets. Throwing an exception is somehow more drastic.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to