关闭

Mark Kafka

标签: Kafka
58人阅读 评论(0) 收藏 举报
分类:
1、创建topic
/opt/kafka_2.9.1-0.8.2.1/bin/kafka-topics.sh --create --zookeeper 127.0.0.1:2181 --replication-factor 1 --partitions 100 --topic presencecapwap


2、修改topic
/opt/kafka_2.9.1-0.8.2.1/bin/kafka-topics.sh --zookeeper 127.0.0.1:2181 --alter --topic presencecapwap --config num.partitions=150


3、删除topic
delete topic step:
      #3-1、/opt/kafka_2.9.1-0.8.2.1/bin/kafka-topics.sh --zookeeper 127.0.0.1:2181 --delete --topic presencecapwap
      #3-2、ps -def | grep kafka
                  kill pid
      #3-3、cd /usr/lib/zookeeper
                  bin/zkCli.sh -server 127.0.0.1:2181
                  ls /
     #3-4、rmr /admin/delete_topics/presencecapwap
                 rmr /config/topics/presencecapwap
                 rmr /brokers/topics/presencecapwap
     #3-5、bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 100 --topic presencecapwap


4、查看topic
/opt/kafka_2.9.1-0.8.2.1/bin/kafka-topics.sh --list --zookeeper 127.0.0.1:2181
/opt/kafka_2.9.1-0.8.2.1/bin/kafka-topics.sh --describe --zookeeper 127.0.0.1:2181 --topic presencecapwap


5、kafka:producer-consumer
    #5-1、producer:/opt/kafka_2.9.1-0.8.2.1/bin/kafka-console-producer.sh --broker-list hzmonitor30:9092 --topic  presencecapwap
    #5-2、consumer:/opt/kafka_2.9.1-0.8.2.1/bin/kafka-console-consumer.sh   --zookeeper 127.0.0.1:2181 --topic presencecapwap  --from-beginning


6、JMX:
com.xx.nms.core.capwap-->CapwapConfig-->DiscardSendPresenceToKafkaEnabled
metrics-->capwap_server.total.success.kafka.request

       -->capwap_server.total.failed.kafka.request


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    文章分类