You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Roey Shem Tov (Jira)" <ji...@apache.org> on 2020/05/01 19:21:00 UTC

[jira] [Commented] (FLINK-17058) Adding TimeoutTrigger support nested triggers

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

Roey Shem Tov commented on FLINK-17058:
---------------------------------------

[~aljoscha] sorry for late response, took me a while to understand all the test mechanisem of flink, 
(by the way great test infrastructure).

I opened pull request with the tests, altaugh i changed a little bit what we talked about:

 
 # onProcessingTime call the nestedTrigger,onProcessingTime but return TriggerResult.FIRE, that because understanding that when processingTimer emit it should FIRE the window.


 # onElement method check the TriggerResult of the nestedTrigger, if the nestedTrigger return any fire result, we are gonna clear the state (because timeout should be reset).
 # added new flag of shouldClearAtTimeout meaning if the timeout arrived should i clear the nestedTrigger, for example if i had ProccessingTimeoutTrigger.of(CountTrigger.of(4)) with timeout of 10 seconds, and after 10 seconds i had 3 records , so when i emit the window should i reset the count to zero?(the record`s counter), or keeping it on 3.

Please provide me any information if something is missing.

> Adding TimeoutTrigger support nested triggers
> ---------------------------------------------
>
>                 Key: FLINK-17058
>                 URL: https://issues.apache.org/jira/browse/FLINK-17058
>             Project: Flink
>          Issue Type: Improvement
>          Components: API / DataStream
>            Reporter: Roey Shem Tov
>            Assignee: Roey Shem Tov
>            Priority: Minor
>              Labels: pull-request-available
>         Attachments: ProcessingTimeoutTrigger.java, ProcessingTimeoutTrigger.java
>
>
> Hello,
> first Jira ticket that im opening here so if there is any mistakes of how doing it, please recorrect me.
> My suggestion is to add a TimeoutTrigger that apply as nestedTrigger(as example how the PurgeTrigger does).
> The TimeoutTrigger will support ProcessTime/EventTime and will have 2 timeous:
>  # Const timeout - when the first element of the window is arriving it is opening a timeout of X millis - after that the window will be evaluate.
>  # Continual timeout - each record arriving will increase the timeout of the evaluation of the window.
>  
> I found it very useful in our case when using flink, and i would like to work on it (if it is possible).
> what do you think?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)