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

Jon Bringhurst commented on KAFKA-1070:
---------------------------------------

[~clarkhaskins], [~sriharsha], having ReservedBrokerIdMaxValue as a 
configurable option (perhaps with a default of 1000) would probably solve 
clark's use case.

Also, if I'm reading this right, it will ignore the broker ID if it's set in 
the config but out of the reserved range (set to -1). It will then create a 
generated broker ID to overwrite the one in the config. It might be nice to 
have the broker error out on startup if a broker.id is set in the config, but 
is out of range. A new broker ID should only be generated if an id isn't 
specified in the config AND the meta.properties doesn't exist (otherwise the 
config file wouldn't match the actual broker ID).

{noformat}
 var brokerId: Int = if (props.containsKey("broker.id")) 
props.getIntInRange("broker.id", (0, ReservedBrokerIdMaxValue)) else -1

... later on ...

    } else if(metaBrokerIdSet.size == 0) {
      if(brokerId < 0) {
        brokerId = ZkUtils.getBrokerSequenceId(zkClient)
      } else {
{noformat}

> Auto-assign node id
> -------------------
>
>                 Key: KAFKA-1070
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1070
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jay Kreps
>            Assignee: Sriharsha Chintalapani
>              Labels: usability
>         Attachments: KAFKA-1070.patch, KAFKA-1070_2014-07-19_16:06:13.patch, 
> KAFKA-1070_2014-07-22_11:34:18.patch
>
>
> It would be nice to have Kafka brokers auto-assign node ids rather than 
> having that be a configuration. Having a configuration is irritating because 
> (1) you have to generate a custom config for each broker and (2) even though 
> it is in configuration, changing the node id can cause all kinds of bad 
> things to happen.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to