当前位置:网站首页>Add / delete query of topic
Add / delete query of topic
2022-06-30 09:52:00 【Keep-upup】
topic The function of is to classify our data
First start zookeeper:kafka It depends on zookeeper Of , So for startup kafka We need to start first. zookeeper
zkServer.sh start
Restart kafka:
kafka-server-start.sh $KAFKA_HOME/config/server.properties &When everything is started jps see :

Successful launch !
Create a Topic:
bin/kafka-topics.sh --zookeeper spark-local:2181 --create --replication-factor 1 --partitions 1 --topic myTopic--topic This is followed by creating topic Of name
--replication-factor This is followed by the number of copies The number of copies cannot be greater than the number of available docker
--partitions This is followed by the number of partitions

View all in the virtual machine Topic:

myTopic Just created topic
Then create another Topic------myTopi
Delete Tipic:
kafka-topics.sh --delete --zookeeper spark-local:2181 --topic myTopi
Check again and there will be no myTopi
see myTopic Details of :
bin/kafka-topics.sh --describe --topic myTopic --zookeeper spark-local:2181 
You can see the number of partitions , replications ,leader Etc .
边栏推荐
猜你喜欢
![[new book recommendation] cleaning data for effective data science](/img/42/1258694fc55a178a666391669a67ad.png)
[new book recommendation] cleaning data for effective data science

【Ubuntu-redis安装】

About the smart platform solution for business hall Terminal Desktop System

GPT (improving language understanding generative pre training) paper notes

Eight sorts (II)

Read the difference and connection between hyperfusion and private cloud

MySQL优化

MySQL explain

Plan the IT technology route for the new year? Let's learn about Gartner infrastructure hype cycle

训练一个图像分类器demo in PyTorch【学习笔记】
随机推荐
2021-10-20
Distributed things
Tablet PC based ink handwriting recognition input method
训练一个图像分类器demo in PyTorch【学习笔记】
Valuenotifier and valuelistenablebuilder in fluent
Acquisition de 100% des actions de Guilin latex par Guilin Robust Medical pour combler le vide de la gamme de produits Latex
MySQL index and data storage structure foundation
Electron, which can wrap web page programs into desktop applications
Upgrade log4j2 to 2.17.1 stepped pit
小程序手持弹幕的原理及实现(uni-app)
Difference between bow and cbow
Tclistener server and tcpclient client
Function simplification principle: save if you can
Simple redis lock
Small program development journey
tf. keras. layers. Attention understanding summary
How to build a private cloud and create a hybrid cloud ecosystem?
Terminal -- Zsh of terminal three swordsmen
Cb/s Architecture - Implementation Based on cef3+mfc
Pass anonymous function to simplification principle