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

Dengpan Yin resolved SAMZA-2327.
--------------------------------
    Resolution: Fixed

> EmbeddedTaggedRateLimiter fails to be initialized when pass 0 as the rate 
> limit
> -------------------------------------------------------------------------------
>
>                 Key: SAMZA-2327
>                 URL: https://issues.apache.org/jira/browse/SAMZA-2327
>             Project: Samza
>          Issue Type: Bug
>            Reporter: Dengpan Yin
>            Priority: Major
>
> When EmbeddedTaggedRateLimiter create a rate limiter, it will assign the rate 
> evenly to each task. If the user config a rate limit to be lower than the 
> number of task instances, EmbeddedTaggedRateLimiter will pass a 0 rate limit 
> to "com.google.common.util.concurrent.RateLimiter.create", which will throw 
> exception. 
> [https://github.com/apache/samza/blob/master/samza-core/src/main/java/org/apache/samza/util/EmbeddedTaggedRateLimiter.java#L118]
>  
> To fix the problem, we could pass a double value to 
> "com.google.common.util.concurrent.RateLimiter.create", and probably warn the 
> user that the rate limit is lower than the number of tasks. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to