Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 05-10-2017 01:24 PM
Hello,
We are currently running 4 kafka brokers v0.8 in our cluster (HDP-2.3.2-2950) and we would like to test some v0.10 brokers in the same cluster. Is this possible? I was thinking about installing manuallly in some machines of the cluster from HDP-2.6.0 repo and apart from Ambari, but I don't know how this will affect zookeepers and if the whole of brokers will be seen as 2 groups of brokers and will work indepently.
I would need advice 🙂
Regards,
Silvio
Created 05-10-2017 03:34 PM
Yes, you can install and manage the second set of Kafka brokers manually (not through Ambari). As for Zookeeper, it can manage multiple Kafka clusters. Just "chroot" them differently
{zookeeperHost}:{portnumber}/{kafkacluster1}
&
{zookeeperHost}:{portnumber}/{kafkacluster2}
Take a look at the link below on how zookeeper manages sessions and on chroot.
https://zookeeper.apache.org/doc/r3.2.2/zookeeperProgrammers.html#ch_zkSessions
To do this:
1) Create the chroot in Zookeeper with the below commands
zkCli.sh -server yourZookeeperHost:2181
# note the empty brackets below are _required_ create /kafkaCluster1 []
This will create a path called "kafkaCluster1". You can verify this by running the "ls/" command.
(* replace "yourZookeeperHost" and the port number with the appropriate values from you environment)
2) For the Kafka brokers configs, under "zookeeper.connect", add a "chroot" path which will make all kafka data for this cluster appear under that particular path. To do this give a connection string in the form kafka_v08_1:port1,kafka_v08_2:port2,kafka_v08_3:port3 yourZookeeperHost:2181/kafkaCluster1 which would put all this cluster's data under the path yourZookeeperHost:2181/kafkaCluster1.
3) For the Kafka consumer configs, under "zookeeper.connect", input the same as you did in step 2 for the brokers
4) Repeat steps 1-3 for your second Kafka cluster using a different "chroot" path
For more explanation of Kafka configs take a look at the below link.
Created 05-10-2017 03:34 PM
Yes, you can install and manage the second set of Kafka brokers manually (not through Ambari). As for Zookeeper, it can manage multiple Kafka clusters. Just "chroot" them differently
{zookeeperHost}:{portnumber}/{kafkacluster1}
&
{zookeeperHost}:{portnumber}/{kafkacluster2}
Take a look at the link below on how zookeeper manages sessions and on chroot.
https://zookeeper.apache.org/doc/r3.2.2/zookeeperProgrammers.html#ch_zkSessions
To do this:
1) Create the chroot in Zookeeper with the below commands
zkCli.sh -server yourZookeeperHost:2181
# note the empty brackets below are _required_ create /kafkaCluster1 []
This will create a path called "kafkaCluster1". You can verify this by running the "ls/" command.
(* replace "yourZookeeperHost" and the port number with the appropriate values from you environment)
2) For the Kafka brokers configs, under "zookeeper.connect", add a "chroot" path which will make all kafka data for this cluster appear under that particular path. To do this give a connection string in the form kafka_v08_1:port1,kafka_v08_2:port2,kafka_v08_3:port3 yourZookeeperHost:2181/kafkaCluster1 which would put all this cluster's data under the path yourZookeeperHost:2181/kafkaCluster1.
3) For the Kafka consumer configs, under "zookeeper.connect", input the same as you did in step 2 for the brokers
4) Repeat steps 1-3 for your second Kafka cluster using a different "chroot" path
For more explanation of Kafka configs take a look at the below link.
Created 05-10-2017 04:04 PM
Well, we have currently running 4 v0.8 brokers with default config. How should I config Zookeepers to specify new brokers in second cluster?
Created 05-10-2017 04:05 PM
I enter ZkCli but I don't know how to do
Created 05-10-2017 04:18 PM
I've updated my response to include the steps.
Created 05-11-2017 10:12 AM
So, do I have to chroot existing cluster too? This 4 brokers group is in production and I can´t stop them.
Apart from this, I'll install 3 new brokers in a second cluster but this will be v0.10. Can I use same zookeepers? I have HDP-2.3.2-2950 and I'll install this second group from HDP-2.6 repositories
Created 05-11-2017 03:03 PM
You do not need to change the path for your existing cluster. Leave it as is. Chroot the second/new cluster. As for versions, you should be ok. To make your config life easier, I suggest you not install both Kafka versions on the same nodes though.
Created 05-11-2017 03:52 PM
Great!! Well, I was thinkg about installing these v0.10 brokers in other empty machines. I suppose it's imposible to manage these v0.10 brokers in same Ambari, right? Maybe I should have both HDP versions installed, but only one of them is current...well, to difficult maybe.
Anyway, thank you very very much for your answers, you saved my life 🙂
I'll mark your answer as accepted 🙂
Created 05-11-2017 03:55 PM
Glad I could help. No, unfortunately you won't be able to manage both clusters with the same Ambari.
Created 05-10-2017 03:49 PM
Well, we have currently running 4 v0.8 brokers with default config. How should I config Zookeepers to specify new brokers in second cluster?