当前位置:网站首页>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
边栏推荐
- Matplotlib swordsman line - first acquaintance with Matplotlib
- AMQ 4043 solution for errors when using IBM MQ remote connection
- Knife4j 2.X版本文件上传无选择文件控件问题解决
- Chrome browser tag management plug-in – onetab
- 西瓜书--第五章.神经网络
- MYSQL安装出现问题(The service already exists)
- hystrix 实现请求合并
- Image transformation, transpose
- Win10 uses docker to pull the redis image and reports an error read only file system: unknown
- "Redis source code series" learning and thinking about source code reading
猜你喜欢
How to realize asynchronous programming in a synchronous way?
CSDN Q & A_ Evaluation
【Go实战基础】gin 如何设置路由
Jd.com interviewer asked: what is the difference between using on or where in the left join association table and conditions
Solution and analysis of Hanoi Tower problem
Talk about the secret of high performance of message queue -- zero copy technology
Probability is not yet. Look at statistical learning methods -- Chapter 4, naive Bayesian method
Flink-使用流批一体API统计单词数量
In depth analysis of how the JVM executes Hello World
What is the future value of fluorite mine of karaqin Xinbao Mining Co., Ltd. under zhongang mining?
随机推荐
微服务实战|Eureka注册中心及集群搭建
Number structure (C language -- code with comments) -- Chapter 2, linear table (updated version)
知识点很细(代码有注释)数构(C语言)——第三章、栈和队列
Talk about the secret of high performance of message queue -- zero copy technology
QT drag event
Function ‘ngram‘ is not defined
Webflux responsive programming
【Go实战基础】如何安装和使用 gin
Solution to amq4036 error in remote connection to IBM MQ
【Go实战基础】gin 如何自定义和使用一个中间件
Typeerror: X () got multiple values for argument 'y‘
「Redis源码系列」关于源码阅读的学习与思考
[staff] time sign and note duration (full note | half note | quarter note | eighth note | sixteenth note | thirty second note)
微服务实战|声明式服务调用OpenFeign实践
Say goodbye to 996. What are the necessary plug-ins in idea?
"Interview high frequency question" is 1.5/5 difficult, and the classic "prefix and + dichotomy" application question
WSL安装、美化、网络代理和远程开发
微服务实战|手把手教你开发负载均衡组件
Sentinel reports failed to fetch metric connection timeout and connection rejection
MYSQL安装出现问题(The service already exists)