执行 reassign partition命令:
/opt/kafka/bin/kafka-reassign-partitions.sh --zookeeper 10.117.10.194:2181,10.252.223.221:2181,10.117.3.243:2181 --reassignment-json-file p4.json --execute
之后topic状态不正常
[root@prod-mq1 bin]# ./kafka-topics.sh --describe --zookeeper 10.117.10.194:2181,10.252.223.221:2181,10.117.3.243:2181 --topic ods_prod11_5_7
Topic:ods_prod11_5_7 PartitionCount:10 ReplicationFactor:3 Configs:
Topic: ods_prod11_5_7 Partition: 0 Leader: 1 Replicas: 1,2,3 Isr: 1
Topic: ods_prod11_5_7 Partition: 1 Leader: 1 Replicas: 1,2,3 Isr: 1
Topic: ods_prod11_5_7 Partition: 2 Leader: 1 Replicas: 1,2,3 Isr: 1
Topic: ods_prod11_5_7 Partition: 3 Leader: 1 Replicas: 1,2,3 Isr: 1
Topic: ods_prod11_5_7 Partition: 4 Leader: 1 Replicas: 1,2,3 Isr: 1
Topic: ods_prod11_5_7 Partition: 5 Leader: 1 Replicas: 1,2,3 Isr: 1
Topic: ods_prod11_5_7 Partition: 6 Leader: 1 Replicas: 1,2,3 Isr: 1
Topic: ods_prod11_5_7 Partition: 7 Leader: 1 Replicas: 1,2,3 Isr: 1
Topic: ods_prod11_5_7 Partition: 8 Leader: 1 Replicas: 1,2,3 Isr: 1
Topic: ods_prod11_5_7 Partition: 9 Leader: 1 Replicas: 1,2,3 Isr: 1
Topic 处于 under replicated 状态.
server.log 充满:
[2018-08-08 16:21:12,773] WARN Received a PartitionLeaderEpoch assignment for an epoch < latestEpoch. This implies messages have arrived out of order. New: {epoch:13, offset:89409682}, Current: {epoch:38, offset84236994} for Partition: prod-rm-bp1p125xw0bvcey34-2 (kafka.server.epoch.LeaderEpochFileCache)
求教大家,如何让topic恢复正常?