You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Yan Fang (JIRA)" <ji...@apache.org> on 2014/05/02 03:02:40 UTC

[jira] [Updated] (SAMZA-258) task.window.ms is inaccurate

     [ https://issues.apache.org/jira/browse/SAMZA-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yan Fang updated SAMZA-258:
---------------------------

    Attachment: SAMZA-258.patch

Quick fix. Moved the clock() above window() and checkpoint() .

> task.window.ms is inaccurate
> ----------------------------
>
>                 Key: SAMZA-258
>                 URL: https://issues.apache.org/jira/browse/SAMZA-258
>             Project: Samza
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Chris Riccomini
>             Fix For: 0.7.0, 0.8.0
>
>         Attachments: SAMZA-258.patch
>
>
> When running a WindowableTask with a long pause during the window() call, the task.window.ms does not reflect how often window() is called.
> If task.window.ms is set to 250ms, and the window() method takes 100ms, you would expect the window() method to be invoked 4 times per second. In fact, it's only invoked 3 times per second:
> {noformat}
> 100ms (window) + 250ms (process) + 100ms (window) + 250ms (process) + 100ms (window) + 250ms (process) = 1050ms
> {noformat}
> The reason for this is that we reset the window timer AFTER window() returns:
> {code}
>     if (isWindowableTask && windowMs >= 0 && lastWindowMs + windowMs < clock()) {
>       task.asInstanceOf[WindowableTask].window(collector, coordinator)
>       lastWindowMs = clock()
>     }
> {code}
> I think we just need to move lastWindowMs above the window() call.
> We should do this for task.commit.ms as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)