You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Chris Riccomini (JIRA)" <ji...@apache.org> on 2014/05/05 19:44:16 UTC
[jira] [Commented] (SAMZA-258) task.window.ms is inaccurate
[ https://issues.apache.org/jira/browse/SAMZA-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989755#comment-13989755 ]
Chris Riccomini commented on SAMZA-258:
---------------------------------------
Window looks good.
For commit could you move `lastCommitMs = clock()` above `storageManager.flush`, since the storage manager and producer flush times might be slow as well?
> 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
> Assignee: Yan Fang
> 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)