当前位置:网站首页>idea查看字节码配置
idea查看字节码配置
2022-07-02 06:34:00 【niceyz】
File-Settings-Tool-External Tools

show byte code
$JDKPath$\bin\javap.exe
-c $FileClass$
$OutputPath$

/********************** kafka **********************/
Kafka cluster集群
点对点模式,需要线程监控
发布/订阅,推送速度与客户端速度不一致
对消息保存根据topic进行归类。
发送者 producer
接受者 consumer
多实例,每个实例(server)称为broker
kafka依赖zookeeper集群保存meta信息,保证系统可用性。客户端请求只能Leader处理
partition:分区
Kafka Cluster集群:
Broker1 :
TopcicA(partition0) Leader
TopcicA(partition1) Follower
Broker2 :
TopcicA(partition0) Follower
TopcicA(partition1) Leader
Broker3 :
Partition0(message0、message1) topic分一个区
Follower不做任何操作
消费者组不能同时消费同一分区
ConsumerA
Consumer group
ConsumerB
一个消费者可以消费多个topic
mkdir logs
cd config
搭建集群,修改: server.properties
broker.id=0
delete.topic.enable=true
log.dirs=/opt/module
zookeeper.connect=hadoop102:2181,hadoop103:2181,hadoop104:2181
cd ..
xsync kafka/
vi server.properties
broker.id=1
broker.id=2
启动kafka之前先启动Zookeeper:
zkstart.sh
查看启动是否成功:
/opt/module/zookeeper-3.4.10/bin/zkServer.sh status
Mode:follower 说明启动成功。
启动kafka:
机器1:bin/kafka-server-start.sh config/server/properties
机器2:bin/kafka-server-start.sh config/server/properties
机器3:bin/kafka-server-start.sh config/server/properties
每台机器需单独启动
util.sh 查看三台机器启动进程
创建 分区数2个 副本数2个 topic名称
bin/kafka-topics.sh --create --zookeeper hadoop102:2181 --partitions 2 -- replication-factor 2 --topic first
查看
bin/kafka-topics.sh --list --zookeeper hadoop102:2181
查看日志
cd logs
三台机器,副本数设置5,会报错,提示最多副本3。
创建 分区2 副本5 topic名称
bin/kafka-topics.sh --create --zookeeper hadoop102:2181 --partitions 2 -- replication-factor 5 --topic second
启动生产者: 往哪个topic发送
bin/kafka-console-producer.sh --broker -list hadoop102:9092 --topic first
>hello
>yz
启动消费者(集群) 在103机器启动
消费哪个topic,获取最新的数据 从一开始进行消费
bin/kafka-console-consumer.sh --zookeeper hadoop102:2181 --topic first --from-beginning
使用bootstrap-server代替zookeeper以消除警告
消费哪个topic,获取最新的数据 从一开始进行消费
bin/kafka-console-consumer.sh --bootstrap-server hadoop102:2181 --topic first --from-beginning
数据存在topic,使用机器104查看有多少个topic
bin/kafka-topics.sh --list --zookeeper hadoop102:2181
__consumer_offsets 解释:系统自动创建,这是应为使用bootstrap后,保存到本地的topic
first
查看topic详情 描述指定topic
bin/kafka-topics.sh --zookeeper hadoop102:2181 --describeopic first
分区 Leader机器 副本 选举用
Topic:first Partition: 0 Leader: 0 Replicas: 0,2 Isr: 0,2
Topic:first Partition: 1 Leader: 1 Replicas: 1,0 Isr: 1,0
Isr: 0,2(这两副本和leader最相近,往前排,leader挂掉后,采用下一个代替Leader)
机器 是否Leader,Leader只负责生产者写数据,Follower主动从Leader拉取数据。
0 Leader
1 Follower
2 Follower
删除topic,会提示设置为true
bin/kafka-topics.sh --delete --zookeeper hadoop102:2181 -topic first
从新创建topic
分区1个 副本3个 指定topic名称
bin/kafka-topics.sh --create --zookeeper hadoop102:2181 --partitions 1 --replication-factro 3 --topic first
边栏推荐
- 微服务实战|声明式服务调用OpenFeign实践
- 【Go实战基础】gin 高效神器,如何将参数绑定到结构体
- Pdf document of distributed service architecture: principle + Design + practice, (collect and see again)
- Cloudreve自建云盘实践,我说了没人能限制得了我的容量和速度
- 长篇总结(代码有注释)数构(C语言)——第四章、串(上)
- MYSQL安装出现问题(The service already exists)
- Shengshihaotong and Guoao (Shenzhen) new energy Co., Ltd. build the charging pile industry chain
- Webflux responsive programming
- Redis zadd导致的一次线上问题排查和处理
- 【Go实战基础】如何安装和使用 gin
猜你喜欢

Chrome浏览器标签管理插件–OneTab

【Go实战基础】gin 如何设置路由

Matplotlib swordsman line - layout guide and multi map implementation (Updated)

ORA-12514问题解决方法

别找了,Chrome浏览器必装插件都在这了

What is the future value of fluorite mine of karaqin Xinbao Mining Co., Ltd. under zhongang mining?

Watermelon book -- Chapter 6 Support vector machine (SVM)

win10使用docker拉取redis镜像报错read-only file system: unknown
![[go practical basis] how to customize and use a middleware in gin](/img/fb/c0a4453b5d3fda845c207c0cb928ae.png)
[go practical basis] how to customize and use a middleware in gin

Cloudrev self built cloud disk practice, I said that no one can limit my capacity and speed
随机推荐
Oracle delete tablespace and user
Chrome视频下载插件–Video Downloader for Chrome
Pyspark de duplication dropduplicates, distinct; withColumn、lit、col; unionByName、groupBy
Probability is not yet. Look at statistical learning methods -- Chapter 4, naive Bayesian method
Data type case of machine learning -- using data to distinguish men and women based on Naive Bayesian method
[go practical basis] how to verify request parameters in gin
聊聊消息队列高性能的秘密——零拷贝技术
Select sort and insert sort
"Redis source code series" learning and thinking about source code reading
Oracle修改表空间名称以及数据文件
AMQ 4043 solution for errors when using IBM MQ remote connection
Leetcode sword finger offer brush questions - day 22
Knife4j 2.X版本文件上传无选择文件控件问题解决
Microservice practice | load balancing component and source code analysis
Break the cocoon | one article explains what is the real cloud primordial
oracle修改数据库字符集
Chrome浏览器标签管理插件–OneTab
Chrome浏览器插件-Fatkun安装和介绍
十年開發經驗的程序員告訴你,你還缺少哪些核心競爭力?
【Go实战基础】gin 如何验证请求参数