Github user aljoscha commented on the pull request:

    https://github.com/apache/flink/pull/1184#issuecomment-143735489
  
    One thing to note here is that you cannot use the old `TriggerPolicy` and 
`EvictionPolicy` anymore. The old concept of windowing helpers is replaced by 
windowing policies. There is `Time`, `Count` and `Delta`.  These are translated 
to `Trigger` and `Evictor` instances using a fixed translation mapping in 
`PolicyToOperator`.
    
    If a user wan't the full flexibility they have to specify a 
`WindowAssigner`. For example, this old API code:
    ```java
    input.window(new MyCustomEvictionPolicy).every(new MyCustomTriggerPolicy)
    ```
    
    can be written with the new API as:
    ```java
    input.window(GlobalWindows.create())
      .trigger(new MyCustomTrigger)
      .evictor(new MyCustomEvictor)
    ```
    
    (I could add a shortcut to `KeyedDataStream`, so that you can directly do 
`.window(Evictor, Trigger)` with an implied `GlobalWindows` assigner.)
    
    Also worth mentioning is that there is no pre-aggregation if an `Evictor` 
is used.



---
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