user1965449
user1965449

Reputation: 2931

Zookeeper change the default quorum and the leader election ports

I am looking at the documentation for setting up a cluster of zookeeper instances, one of the options(albeit its not redundant) is to set up multiple zookeeper instances on a single machine .

If I were to set up multiple instances on a single machine then I need to change the default quorum and the leader election ports from 2888 & 3888 to something else , how can I change the default port? There does not seem to be any documented way of doing so .

Upvotes: 1

Views: 2525

Answers (1)

igorbel
igorbel

Reputation: 1396

You can see how to setup a cluster here: - http://zookeeper.apache.org/doc/r3.4.7/zookeeperAdmin.html#sc_zkMulitServerSetup

Which means you can change the ports for individual nodes in the cluster:

tickTime=2000
dataDir=/var/lib/zookeeper/
clientPort=2181
initLimit=5
syncLimit=2
server.1=zoo1:2888:3888
server.2=zoo2:2888:3888
server.3=zoo3:2888:3888

Upvotes: 0

Related Questions