当前位置:网站首页>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剑客行——布局指南与多图实现(更新)
- Troubleshooting and handling of an online problem caused by redis zadd
- Jd.com interviewer asked: what is the difference between using on or where in the left join association table and conditions
- Gocv split color channel
- C language implementation of mine sweeping game
- 微服务实战|负载均衡组件及源码分析
- Gocv image reading and display
- 《统计学习方法》——第五章、决策树模型与学习(上)
- Chrome user script manager tempermonkey monkey
- 【Go实战基础】gin 如何获取 GET 和 POST 的请求参数
猜你喜欢

Number structure (C language) -- Chapter 4, compressed storage of matrices (Part 2)

Redis安装部署(Windows/Linux)

How to realize asynchronous programming in a synchronous way?

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

Data type case of machine learning -- using data to distinguish men and women based on Naive Bayesian method

oracle修改数据库字符集

A detailed explanation takes you to reproduce the statistical learning method again -- Chapter 2, perceptron model

WSL安装、美化、网络代理和远程开发

QT -- how to set shadow effect in QWidget

一篇详解带你再次重现《统计学习方法》——第二章、感知机模型
随机推荐
Probability is not yet. Look at statistical learning methods -- Chapter 4, naive Bayesian method
Leetcode sword finger offer brush questions - day 22
Shengshihaotong and Guoao (Shenzhen) new energy Co., Ltd. build the charging pile industry chain
Don't spend money, spend an hour to build your own blog website
Knife4j 2. Solution to the problem of file control without selection when uploading x version files
2022/2/13 summary
Pyspark de duplication dropduplicates, distinct; withColumn、lit、col; unionByName、groupBy
Number structure (C language -- code with comments) -- Chapter 2, linear table (updated version)
QT drag event
Microservice practice | teach you to develop load balancing components hand in hand
AMQ 4043 solution for errors when using IBM MQ remote connection
C4D quick start tutorial - C4d mapping
Actual combat of microservices | discovery and invocation of original ecosystem implementation services
Chrome user script manager tempermonkey monkey
Number structure (C language) -- Chapter 4, compressed storage of matrices (Part 2)
There is a problem with MySQL installation (the service already exists)
MYSQL安装出现问题(The service already exists)
Leetcode sword finger offer brush questions - day 23
十年开发经验的程序员告诉你,你还缺少哪些核心竞争力?
Data type case of machine learning -- using data to distinguish men and women based on Naive Bayesian method