zoukankan      html  css  js  c++  java
  • Kafka命令清单(转发)

    一、队列常用命令

    #创建topics
    $ ./kafka-topics.sh --create --zookeeper chenx02:2181 --replication-factor 1 --partitions 1 --topic test

    #查看队列列表
    $ ./kafka-topics.sh --list --zookeeper chenx02:2181

    #查看队列明细
    $ ./kafka-topics.sh --describe --zookeeper chenx02:2181 --topic test

    #修改(test)队列参数
    $ ./kafka-topics.sh --zookeeper chenx02:2181 --partition 3 --topic test --alter

    #创建多副本的队列
    $ ./kafka-topics.sh --create --zookeeper chenx02:2181 --replication-factor 3 --partitions 4 --topic test_kafka 

    #删除kafka的队列[注意需要重启kafka集群] 
    $ ./kafka-run-class.sh kafka.admin.DeleteTopicCommand --topic test_kafka --zookeeper chenx02:2181

    #查看不可用的分区 
    $./kafka-topics.sh --describe --unavailable-partitions --zookeeper chenx02:2181 --topic  test_kafka

    #发送消息 
    $ ./kafka-console-producer.sh --broker-list chenx02:9092 --topic test
    #消费消息 
    $ ./kafka-console-consumer.sh --zookeeper chenx02:2181 --topic test --from-beginning
  • 相关阅读:
    排序算法比较及其应用
    confluence wiki 安装
    hbase优缺点
    maven nexus私服搭建
    IntelliJ Idea 2017 免费激活方法
    presto-cli通过hive查询hdfs
    monit拉起服务
    MAC nginx代理设置
    kafka-manager安装
    flume从log4j收集日志输出到kafka
  • 原文地址:https://www.cnblogs.com/panpanwelcome/p/13590178.html
Copyright © 2011-2022 走看看