Why should we use an evictor operator in flink window

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why should we use an evictor operator in flink window

Congxian Qiu
Hi, all
    When using Flink window, I do not know why should we use an evictor operator in flink window, after reading the EvictingWindowOperator.java, I think we could do all the [evcitor] things in the userfunction. Could anyone help me to understand these?


    I have digged the history of `Evictor.java`, but did not gotten the reason
       1. in FLINK-2677(https://issues.apache.org/jira/browse/FLINK-2677) Flink introduced the evictor operator, but I did not find the reason why we should have the evictor operator.
       2. In FLIP-4 we enhance the Evictor operator.

--
GTalk:qcx978132955
一切随心
Reply | Threaded
Open this post in threaded view
|

Re: Why should we use an evictor operator in flink window

Fabian Hueske-2
Hi,

The Evictor is useful if you want to remove some elements from the window state but not all.
This also implies that a window is evaluated multiple times because otherwise you could just filter in the the user function (as you suggested) and purge the whole window afterwards.
Evictors are commonly used in combination with GlobalWindows.

Best, Fabian

2018-07-04 5:00 GMT+02:00 Congxian Qiu <[hidden email]>:
Hi, all
    When using Flink window, I do not know why should we use an evictor operator in flink window, after reading the EvictingWindowOperator.java, I think we could do all the [evcitor] things in the userfunction. Could anyone help me to understand these?


    I have digged the history of `Evictor.java`, but did not gotten the reason
       1. in FLINK-2677(https://issues.apache.org/jira/browse/FLINK-2677) Flink introduced the evictor operator, but I did not find the reason why we should have the evictor operator.
       2. In FLIP-4 we enhance the Evictor operator.

--
GTalk:qcx978132955
一切随心