You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by auradkar <gi...@git.apache.org> on 2015/09/14 20:30:40 UTC

[GitHub] kafka pull request: KAFKA-2443 Expose windowSize on Rate

GitHub user auradkar opened a pull request:

    https://github.com/apache/kafka/pull/213

    KAFKA-2443  Expose windowSize on Rate

    This is a followup ticket from KAFKA-2084 to improve the windowSize calculation in Quotas. I've made the following changes:
    
    1. Added a windowSize function on Rate
    2. Calling Rate.windowSize in ClientQuotaManager to return the exact window size to use when computing the delay time.
    3. Changed the window size calculation subtly. The current calculation had a bug wherein, it used the number of elapsed seconds from the "lastWindowSeconds" of the most recent Sample object. However, the lastWindowSeconds is the time when the sample is created.. this causes an issue because it implies that the current window elapsed time is always "0" when the sample is created. This is incorrect as demonstrated in a testcase I added in MetricsTest. I've fixed the calculation to count the elapsed time from the "oldest" sample in the set since that gives us an accurate value of the exact amount of time elapsed

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/auradkar/kafka K-2443

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/213.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #213
    
----
commit 78868c50fd7966d20bf023509b9a444f6cea1443
Author: Aditya Auradkar <aa...@linkedin.com>
Date:   2015-09-14T17:43:55Z

    Fixing K-2443

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] kafka pull request: KAFKA-2443 Expose windowSize on Rate; KAFKA-25...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/kafka/pull/213


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---