kafka之配置
主要介绍kafka相关的知识。该篇主要介绍kakfa基础配置和使用。
包括:
- zookeeper;
- kafka;
- kafka-manager;
zookeeper安装比较简单。
mv zoo_sampk.cfg zoo.cfg
配置包括日志和数据地址。集群的话要配置多个server1,server2等等。
# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/home/work/zookeeper/zkdata
#日志存放的位置
dataLogDir=/home/work/zookeeper/zklog
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1
server.1=10.231.39.48:2888:3888
#server.2=10.38.163.219:2888:3888
bin中的zkServer.sh控制程序启动,关闭等等。
kafka是依赖zookeeper,必须提前安装好。
kafaka-manager 提供了监控后台。
需要编译:sbt
编译完成后会生成target目标目录,执行target/universal/kafka-manager-版本号/bin/kafka-manger -Dconfig_file=conf/application.yml 这必须显示指定。
--------EOF---------
微信分享/微信扫码阅读
微信分享/微信扫码阅读