首页 > 其他分享 >kafka单独集群搭建

kafka单独集群搭建

时间:2023-05-31 23:04:19浏览次数:36  
标签:timeline bytes kafka metrics 集群 ms max 搭建


 



查看kafka配置

下面配置是由ambari配置生成。cat conf/server.properties

# Generated by Apache Ambari. Tue Oct 25 10:40:07 2022
    
auto.create.topics.enable=true
auto.leader.rebalance.enable=true
compression.type=producer
controlled.shutdown.enable=true
controlled.shutdown.max.retries=3
controlled.shutdown.retry.backoff.ms=5000
controller.message.queue.size=10
controller.socket.timeout.ms=30000
default.replication.factor=1
delete.topic.enable=true
external.kafka.metrics.exclude.prefix=kafka.network.RequestMetrics,kafka.server.DelayedOperationPurgatory,kafka.server.BrokerTopicMetrics.BytesRejectedPerSec
external.kafka.metrics.include.prefix=kafka.network.RequestMetrics.ResponseQueueTimeMs.request.OffsetCommit.98percentile,kafka.network.RequestMetrics.ResponseQueueTimeMs.request.Offsets.95percentile,kafka.network.RequestMetrics.ResponseSendTimeMs.request.Fetch.95percentile,kafka.network.RequestMetrics.RequestsPerSec.request
fetch.purgatory.purge.interval.requests=10000
kafka.ganglia.metrics.group=kafka
kafka.ganglia.metrics.host=localhost
kafka.ganglia.metrics.port=8671
kafka.ganglia.metrics.reporter.enabled=true
kafka.metrics.reporters=org.apache.hadoop.metrics2.sink.kafka.KafkaTimelineMetricsReporter
kafka.timeline.metrics.host_in_memory_aggregation=false
kafka.timeline.metrics.host_in_memory_aggregation_port=61888
kafka.timeline.metrics.host_in_memory_aggregation_protocol=http
kafka.timeline.metrics.hosts=hadoop168
kafka.timeline.metrics.maxRowCacheSize=10000
kafka.timeline.metrics.port=6188
kafka.timeline.metrics.protocol=http
kafka.timeline.metrics.reporter.enabled=true
kafka.timeline.metrics.reporter.sendInterval=5900
kafka.timeline.metrics.truststore.password=bigdata
kafka.timeline.metrics.truststore.path=/etc/security/clientKeys/all.jks
kafka.timeline.metrics.truststore.type=jks
leader.imbalance.check.interval.seconds=300
leader.imbalance.per.broker.percentage=10
listeners=PLAINTEXT://hadoop166:9092
log.cleanup.interval.mins=10
log.dirs=/kafka-logs
log.index.interval.bytes=4096
log.index.size.max.bytes=10485760
log.retention.bytes=-1
log.retention.check.interval.ms=600000
log.retention.hours=168
log.roll.hours=168
log.segment.bytes=1073741824
message.max.bytes=1000000
min.insync.replicas=1
num.io.threads=8
num.network.threads=3
num.partitions=1
num.recovery.threads.per.data.dir=1
num.replica.fetchers=1
offset.metadata.max.bytes=4096
offsets.commit.required.acks=-1
offsets.commit.timeout.ms=5000
offsets.load.buffer.size=5242880
offsets.retention.check.interval.ms=600000
offsets.retention.minutes=86400000
offsets.topic.compression.codec=0
offsets.topic.num.partitions=50
offsets.topic.replication.factor=3
offsets.topic.segment.bytes=104857600
port=9092
producer.metrics.enable=false
producer.purgatory.purge.interval.requests=10000
queued.max.requests=500
replica.fetch.max.bytes=1048576
replica.fetch.min.bytes=1
replica.fetch.wait.max.ms=500
replica.high.watermark.checkpoint.interval.ms=5000
replica.lag.max.messages=4000
replica.lag.time.max.ms=10000
replica.socket.receive.buffer.bytes=65536
replica.socket.timeout.ms=30000
sasl.enabled.mechanisms=GSSAPI
sasl.mechanism.inter.broker.protocol=GSSAPI
security.inter.broker.protocol=PLAINTEXT
socket.receive.buffer.bytes=102400
socket.request.max.bytes=104857600
socket.send.buffer.bytes=102400
ssl.client.auth=none
ssl.key.password=
ssl.keystore.location=
ssl.keystore.password=
ssl.truststore.location=
ssl.truststore.password=
zookeeper.connect=hadoop164:2181,hadoop166:2181,hadoop168:2181
zookeeper.connection.timeout.ms=25000
zookeeper.session.timeout.ms=30000
zookeeper.sync.time.ms=2000

需要在上面配置文件添加,这里每个实例需要单独配置不同id,根据情况配置

broker.id=0
host.name=hadoop164

 

验证配置启动kafka

sh kafka-server-start.sh ../config/server.properties
已deamon形式启动
sh kafka-server-start.sh -daemon ../config/server.properties
sh kafka-console-producer.sh --broker-list 192.168.9.135:9092 --topic xzx

sh kafka-console-consumer.sh --bootstrap-server 192.168.9.135:9092 --topic xzx --from-beginning

 

 

标签:timeline,bytes,kafka,metrics,集群,ms,max,搭建
From: https://blog.51cto.com/lenglingx/6390800

相关文章

  • flink1.14.5集群(flink on yarn)部署1
    先安装hadoop,yarn,zookeeper 配置环境变量vim/etc/profile(注意新增了HADOOP_CLASSPATH变量)exportHADOOP_CLASSPATH=`/home/opt/hadoop-2.9.2/bin/hadoopclasspath`exportFLINK_HOME=/home/opt/flink-1.14.5exportPATH=$PATH:$FLINK_HOME/binsource/etc/profile......
  • hadoop-2.9.2集群安装
     curlhttp://10.99.67.4:8000/apache-hive-2.3.9-bin.tar.gz-oapache-hive-2.3.9-bin.tar.gzcurlhttp://10.99.67.4:8000/apache-zookeeper-3.5.7-bin.tar.gz-oapache-zookeeper-3.5.7-bin.tar.gzcurlhttp://10.99.67.4:8000/flink-1.14.5-bin-scala_2.12.tgz-ofli......
  • HBase-2.2.3集群安装
     /不需要手动创建,系统程序会自动创建hdfsdfs-mkdir-p/hbasehdfsdfs-chmod-R777/hbasehdfs://hadoop34:9000/hbase先设定hbase安装目录/home/opt/hbase-2.2.3tar-xvzfhbase-2.2.3.tar.gzmvhbase-2.2.3/home/opt配置环境变量vim/etc/profile添加如下ex......
  • k8s 环境搭建
    1.k8s安装systemctlstopfirewalldsystemctldisablefirewalld#修改hostnamehostnamectlset-hostnamek8s-01#查看修改结果hostnamectlstatus#设置hostname解析echo"127.0.0.1$(hostname)">>/etc/hosts#关闭selinux:sed-i's/enforcing/disabled......
  • 负载均衡集群ipvsadm命令及基本用法
     ipvsadm是LVS在应用层的管理命令,我们可以通过这个命令去管理LVS的配置。需要使用yum单独安装。基本用法:ipvsadmCOMMAND[protocol]service-address        [scheduling-method][persistenceoptions]ipvsadmcommand[protocol]service-address  ......
  • Redis主从复制、哨兵、集群原理部署介绍
    Redis主从复制、哨兵、集群原理部署介绍原创 程序话题 IT当时语 2023-04-1820:26 发表于广东收录于合集#架构设计22个#分布式系统17个#Redis4个#微服务11个#分布式锁3个Redis主从复制、哨兵、集群原理部署介绍Redis主从复制的核心原理在分布式架构设计中......
  • 【2023 · CANN训练营第一季】——搭建环境:创建ECS,下载sample仓
    前言:        本文是环境搭建的第一篇笔记。主要包括下面两方面内容:    1、在华为云上创建ECS服务器,并修改Ubuntu源和pip源为国内镜像地址。        2、为了更好的使用ECS,需要在本地安装远程连接和查看代码的工具软件,以Windows为例介绍几个常用的工具软件。......
  • 玩转服务器之网站篇:新手使用WordPress搭建博客和静态网站部署
    静态网站部署和WordPress搭建博客都是网站运营中常见的工作。静态网站是一种不需要服务器端脚本的网站形式,通常使用HTML、CSS和JavaScript等静态资源进行构建和显示。而WordPress是一款流行的博客系统,可以帮助用户快速搭建博客网站。在之前的玩转服务器系列文章里,我们介绍了如何构......
  • 简易视频直播系统的搭建实践
    简易视频直播系统的搭建实践基于ffmpeg+Nginx+nginx-rtmp模块+VLC实现一、推流(主播端)FFmpeg是一款强大的开源多媒体框架,可以用于处理音频、视频和图片等多媒体数据。同时,FFmpeg也可以用作推流工具,用于将本地视频或音频流推送到远程服务器上。1、摄像头推流1.1、获......
  • kubeasz部署k8s集群
    官网:https://github.com/easzlab/kubeasz架构图免密登入ssh-keygenssh-copy-id172.16.251.4ssh-copy-id172.16.251.5ssh-copy-id172.16.251.6ssh-copy-id172.16.251.7ssh-copy-id172.16.251.8ssh-copy-id172.16.251.9下载ezdown脚本root@k8s-deploy:~#exp......