Apache kafka 如何在卡夫卡0.11中重置偏移

Apache kafka 如何在卡夫卡0.11中重置偏移,apache-kafka,Apache Kafka,我用的是卡夫卡0.11。我正在尝试重置消费者组中某个主题的偏移量,但没有看到选项之间的一致性。如何计算卡夫卡消费群体中不同选项的补偿 $ /opt/cloudera/parcels/KAFKA-3.0.0-1.3.0.0.p0.40/lib/kafka/bin/kafka-consumer-groups.sh --bootstrap-server xxxxxxxxxxxx.devkafka.com:9092 --group testgroup --reset-offsets **--by-dur

我用的是卡夫卡0.11。我正在尝试重置消费者组中某个主题的偏移量,但没有看到选项之间的一致性。如何计算卡夫卡消费群体中不同选项的补偿

$ /opt/cloudera/parcels/KAFKA-3.0.0-1.3.0.0.p0.40/lib/kafka/bin/kafka-consumer-groups.sh --bootstrap-server xxxxxxxxxxxx.devkafka.com:9092 --group testgroup --reset-offsets **--by-duration PT1H30M0S** --topic Test_Upgrade --export --command-config client.properties 2>/dev/null
**Test_Upgrade,1,615
Test_Upgrade,0,625**

$ date
**Thu May 31 15:30:45 BST 2018**

$ /opt/cloudera/parcels/KAFKA-3.0.0-1.3.0.0.p0.40/lib/kafka/bin/kafka-consumer-groups.sh --bootstrap-server xxxxxxxxxxxx.devkafka.com:9092 --group testgroup --reset-offsets **--to-datetime 2018-05-31T14:00:00.000** --topic Test_Upgrade --export --command-config client.properties 2>/dev/null
**Test_Upgrade,1,754
Test_Upgrade,0,772**
--到datetime
-当我们要将偏移重置到特定时间点时。(例如,到2017年1月1日00:00重新处理这些年份的所有记录)
——按持续时间
——当我们想回到一段时间前(例如P7D重新处理一周前的所有记录)

从这里开始

要实际运行它,需要将
--execute
添加到命令中,如果没有它,Kafka将打印操作结果

更多信息在此