[ 
https://issues.apache.org/jira/browse/KAFKA-324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436096#comment-13436096
 ] 

Neha Narkhede commented on KAFKA-324:
-------------------------------------

Jun, I don't think getIntInRange provides any more functionality over require. 
The only difference is that it throws KafkaException, but if a config value is 
incorrect, I would imagine it is preferable to get IllegalArgumentException. 
And require allows you to plug in whatever description you need to make the 
error message meaningful. It is true that currently our code is using 
getIntInRange, but I actually like require better. 

Swapnil, as part of maybe another JIRA, do you mind looking into if it is a 
good idea to move to using require for other config options as well ?
                
> enforce broker.id to be a non-negative integer
> ----------------------------------------------
>
>                 Key: KAFKA-324
>                 URL: https://issues.apache.org/jira/browse/KAFKA-324
>             Project: Kafka
>          Issue Type: Improvement
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>            Assignee: Swapnil Ghike
>              Labels: newbie, noob
>         Attachments: kafka-324.patch
>
>
> In DefaultEventHandler, it seems that we rely on the fact that broker.id is a 
> non-negative integer. However, we don't enforce that in broker startup. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to