You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Robin Sylvan (JIRA)" <ji...@apache.org> on 2018/05/09 04:11:00 UTC

[jira] [Created] (SAMZA-1707) Samza onTimer method triggering before init

Robin Sylvan created SAMZA-1707:
-----------------------------------

             Summary: Samza onTimer method triggering before init
                 Key: SAMZA-1707
                 URL: https://issues.apache.org/jira/browse/SAMZA-1707
             Project: Samza
          Issue Type: Bug
          Components: container
    Affects Versions: 0.14.1
         Environment:  
 
            Reporter: Robin Sylvan


If you create a samza job with an onTimer method, TimerRegistry registers the timer before the container is running. This leads to an edge case where if the initial `registerTimer` delay is too small, the onTimer function will never get called (this can mean you never get to schedule subsequent timers if your onTimer function periodically schedules it's next call).

I ran into this when setting my timer to schedule onTimer events every 250 milliseconds. One temporary workaround for this is to make the registerTimer function have a high initial delay (e.g. 10 seconds).
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)