热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

HowtosetanApacheKafkamultinode–multibrokercluster【z】

SetamultinodeApacheZooKeeperclusterOneverynodeoftheclusteraddthefollowinglinestothefile ka

Set a multi node Apache ZooKeeper cluster

  • On every node of the cluster add the following lines to the file kafka/config/zookeeper.properties
server.1=zNode01:2888:3888
server.2=zNode02:2888:3888
server.3=zNode03:2888:3888
#add here more servers if you want
initLimit=5
syncLimit=2

For more informations about the meaning of the parameters please read Running Replicated ZooKeeper.

  • On every node of the cluster create a file called myid in the folder represented by the dataDir property (by default the folder is /tmp/zookeeper ). The myid file should only contains the id of the znode (‘1′ for zNode01, ‘2’ for ZNode02, etc… )

Set a multi broker Apache Kafka cluster

  • On every node of the cluster modify modify the property zookeeper.connect from the file  kafka/config/server.properties:
zookeeper.cOnnect=zNode01:2181,zNode02:2181,zNode03:2181
  • On every node of the cluster modify the property host.name from the file kafka/config/server.properties:
host.name=zNode0x
  • On every node of the cluster modify the property broker.id from the file kafka/config/server.properties (every broker in the cluster should have a unique id)

推荐阅读
author-avatar
田卫涛1983_407
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有