It looks like You set up three separate ZK clusters, not an ensemble.
You can take a look at
http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_zkMulitServerSetup
on how to set up an ensemble; and then register all three kafka
brokers on that single zk ensemble.

Joel

On Thu, Oct 09, 2014 at 11:37:58AM -0700, Sa Li wrote:
> Hi, All
> 
> I setup a 3-node kafka cluster on top of 3-node zk ensemble. Now I launch 1
> broker on each node,  the brokers will be randomly distributed to zk
> ensemble, see
> 
> DO-mq-dev.1
> [zk: localhost:2181(CONNECTED) 1] ls /brokers/ids
> [0, 1]
> pof-kstorm-dev1.2
> [zk: localhost:2181(CONNECTED) 1] ls /brokers/ids
> []
> pof-kstorm-dev2.3
> [zk: localhost:2181(CONNECTED) 1] ls /brokers/ids
> [2]
> 
> which means zk1 hosts 2 brokers, zk3 hosts 1 brokers, that will raise a
> problem, that I am unable to create a topic with replications, say 3, it
> will throw such exceptions
> 
> Error while executing topic command replication factor: 3 larger than
> available brokers: 0
> 
> Is there any ways that I can create a topic which can be replicated
> throughout entire zk ensemble as I know we will have to introduce more than
> 1 broker in single zk Server if we want to be able to create replicated
> topics/
> 
> thanks
> 
> -- 
> 
> Alec Li

Reply via email to