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/01 18:15:17 UTC

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

Chris Riccomini created SAMZA-258:
-------------------------------------

             Summary: 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


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)