You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Bowen Li (JIRA)" <ji...@apache.org> on 2017/12/27 07:17:00 UTC

[jira] [Commented] (FLINK-8322) support getting number of existing timers in TimerService

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

Bowen Li commented on FLINK-8322:
---------------------------------

This might be a followup of [this email thread|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Why-TimerService-interface-in-ProcessFunction-doesn-t-have-deleteEventTimeTimer-td12719.html]

According to my research, this can be done by exposing {{numProcessingTimeTimers(N namespace)}} and {{numEventTimeTimers(N namespace)}}. But their performance is both {O(n)}, which seems to be a bit inefficient and thus falls to the same situation with {{delete()}} that we may not want to expose to users. 

[~StephanEwen] [~aljoscha] Any suggestions?

> support getting number of existing timers in TimerService
> ---------------------------------------------------------
>
>                 Key: FLINK-8322
>                 URL: https://issues.apache.org/jira/browse/FLINK-8322
>             Project: Flink
>          Issue Type: Improvement
>          Components: DataStream API
>    Affects Versions: 1.4.0
>            Reporter: Bowen Li
>            Assignee: Bowen Li
>             Fix For: 1.5.0
>
>
> We have the use cases where we want to use timers as scheduled threads - e.g. add a timer to wake up x hours later and do something (reap old data usualy) only if there's no existing timers, basically we only want at most 1 timer exists for the key all the time



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)