• kafka 常用命令


    启动kafka bin/kafka-server-start.sh config/server.properties &
    停止kafka bin/kafka-server-stop.sh
    查看kafka状态是否运行 jps
    检查kafka (在集群3台服务器上分别执行)
    bin/kafka-topics.sh --list --zookeeper 118.190.87.33:2181,118.190.139.83:2181,118.190.88.157:2181/kafka
     
    查看已经创建的topic列表
    bin./kafka-topics.sh --list --zookeeper
    192.168.15.186:2181,192.168.15.187:2181,192.168.15.188:2181/kafka
     
    创建topic
    bin/kafka-topics.sh —create —zookeeper 10.27.17.67:2181,10.27.17.151:2181,10.27.16.204:2181/kafka —replication-factor 3 —partitions 6 —topic bizcar_creditlock_response
    bin/kafka-topics.sh --create --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --replication-factor 3 --partitions 12 --topic bizcar_position_report
     
     
    1、查看是否收到故障码
    bin/kafka-console-consumer.sh --zookeeper 10.27.17.67:2181,10.27.17.151:2181,10.27.16.204:2181/kafka  --topic bizcar_fault_report
    bin/kafka-console-consumer.sh --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka  --topic sendOtherAlarm
    bin/kafka-console-consumer.sh --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka  --topic bizcar_raw_report
    2、
    查看多少未消费
    ./kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --group test_consumer
    ./kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --group=test_consumer
     
    bin/kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --group test_consumer
    3.消费消息
    ./kafka-console-consumer.sh --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --from-beginning --topic orderCancel
    查看 bizcar_position_report未消费的
    bin/kafka-run-class.sh kafka.tools.ConsumerOffsetChecker --zookeeper 172.31.103.224:2181,172.31.103.221:2181,172.31.103.222:2181/kafka --group test_consumer --topic bizcar_position_report
    4.真正有数据存在的分区是由生产发送端来决定,即使你的kafka设置了10个分区,消费端在消费的时候,消费线程虽然会根据zookeeper的某种机制来声明它所消费的分区,但实际消费过程中,还是会消费真正存在数据的分区。(本例中,你只往6个分区push了数据,所以即使你声明了10个分区,你也只能消费6个分区的数据)。
    5.启动kafka
    bin/kafka-server-start.sh config/server.properties
    6.kafka若有未消费的数据
    若消费组为none,,dse一直重启

    5. 启动zookeeper
    cd /app/zookeeper-3.4.10/bin
    ./zkServer.sh start
    ./zkServer.sh status  查看集群状态
     
     
    2. dse重新锁车
    tail -100f info.log|grep bizcar_gps_lock_response
     
    tail -100f info.log|grep bizcar_position_report
     
    3. 查看dse日志是否调用ws的
    tail -100f info.log |grep "notify saas build All data"
    cat info.log |grep bizcar_position_report
    4,gw 语音播报
    tail -10f kajiagw.log|grep this.ResponseMessageHexStr
    tail -10f kajiagw.log|grep "this.ResponseMessageHexStr---8300"
     
    5,故障码
    spn,fmi
     
     
  • 相关阅读:
    一、Redis源码结构
    StringUtils工具类用法
    什么是多态
    Spring事务配置的五种方式
    不错的spring学习博客
    hibernate.current_session_context_class 比较权威的解释
    搞搞hibernate.current_session_context_class
    Spring MVC @Transactional注解方式事务失效的解决办法
    spring 中 hibernate 的 2种 配置方式(新旧 2种方式)
    Spring+Hibernate整合配置 --- 比较完整的spring、hibernate 配置
  • 原文地址:https://www.cnblogs.com/snowwhitecityofsky/p/9173165.html
Copyright © 2020-2023  润新知