Flink也会commit offset到Kafka的[1],当然在开checkpoint和不开checkpoint的时候表现有些不同。
offset 只要是commit到了kafka,查看offset的方式我理解跟用其他方式commit的offset的查阅方式应该没有区别的。如果你看不到flink消费的topic对应的offset,可能需要check下是什么原因没有commit offset. [1] https://ci.apache.org/projects/flink/flink-docs-master/dev/connectors/kafka.html#kafka-consumers-offset-committing-behaviour-configuration wqpapa <[email protected]> 于2020年1月12日周日 下午9:34写道: > 感谢回复!主要想了解下如何从kafka端后台命令方式获取对应消费组的偏移信息。之前通过普通的java代码消费kafka数据,通过kafka-consumer-groups.sh > --describe可获取到消费偏移信息,但通过flink消费,不知道要怎么在kafka端获取偏移信息? > > > > > > > > > > 在 2020-01-12 21:17:40,"Benchao Li" <[email protected]> 写道: > >setStartFromGroupOffsets > > >说的是从kafka里面保存的offset开始消费,flink并没有保证kafka一定会有这个consumer的offset,如果没有的话,会按照kafka > >consumer的配置'auto.offset.reset'来设置这些partition的offset。 > > > >具体情况可以参考文档[1]. > > > >[1] > > > https://ci.apache.org/projects/flink/flink-docs-master/dev/connectors/kafka.html#kafka-consumers-start-position-configuration > > > >wqpapa <[email protected]> 于2020年1月12日周日 下午9:09写道: > > > >> flink通过FlinkKafkaConsumer消费kafka主题,设置group.id > >> 按setStartFromGroupOffsets取偏移,如何在kafka端获取对应group.id的偏移信息? > >> kafka为0.9版本,在zk那边找不到对应的group.id;通过kafka-consumer-groups.sh --describe > >> --group ,也取不到。请问下要怎么获取啊? > > > > > > > >-- > > > >Benchao Li > >School of Electronics Engineering and Computer Science, Peking University > >Tel:+86-15650713730 > >Email: [email protected]; [email protected] > -- Benchao Li School of Electronics Engineering and Computer Science, Peking University Tel:+86-15650713730 Email: [email protected]; [email protected]
