Chinaunix首页 | 论坛 | 博客
  • 博客访问: 141580
  • 博文数量: 56
  • 博客积分: 245
  • 博客等级: 二等列兵
  • 技术积分: 520
  • 用 户 组: 普通用户
  • 注册时间: 2012-10-08 14:43
个人简介

慢慢来

文章分类

全部博文(56)

文章存档

2017年(5)

2016年(2)

2015年(6)

2014年(28)

2013年(5)

2012年(10)

我的朋友

分类: 大数据

2017-07-12 09:46:57

1. Create one topic

    kafka-topics.sh --create --zookeeper c157rnb --replication-factor 2 --partitions 4 --topic test.myang

2. List topics

    kafka-topics.sh --zookeeper c157rnb --list

3. 
Get topic offset
bin/kafka-run-class.sh kafka.tools.GetOffsetShell \ 
    --broker-list localhost:9092,localhost:9093,localhost:9094 \
    --topic test.myang \
    --time -1 

4. consume message from topic

    kafka-console-consumer.sh --zookeeper c157rnb --topic ecpcibimbqm.esindexer.offset.master
   * ? can specify the offset?

阅读(339) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~