这个kafka集群有4个节点,这个isr要怎么恢复,现在四个节点都在线

天南地北 发表于: 2019-04-02   最后更新时间: 2019-04-03 00:02:45   3,978 游览

比如 Topic: __consumer_offsets Partition: 8 Leader: 2 Replicas: 2,4,1,3 Isr: 2
isr 只有一个 2, 一旦 2 节点掉了,是不是部分数据就没办法访问

[root@zx001 kafka]# su kafka
[kafka@zx001 kafka]$ bin/kafka-topics.sh --zookeeper zx008:2181 --topic  __consumer_offsets  --describe
Topic:__consumer_offsets        PartitionCount:50       ReplicationFactor:4     Configs:segment.bytes=104857600,cleanup.policy=compact,compression.type=uncompressed
        Topic: __consumer_offsets       Partition: 0    Leader: 2       Replicas: 2,1,3,4       Isr: 2
        Topic: __consumer_offsets       Partition: 1    Leader: 3       Replicas: 3,2,4,1       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 2    Leader: 4       Replicas: 4,3,1,2       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 3    Leader: 1       Replicas: 1,4,2,3       Isr: 1,3,4,2
        Topic: __consumer_offsets       Partition: 4    Leader: 2       Replicas: 2,3,4,1       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 5    Leader: 3       Replicas: 3,4,1,2       Isr: 1,3,4,2
        Topic: __consumer_offsets       Partition: 6    Leader: 4       Replicas: 4,1,2,3       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 7    Leader: 1       Replicas: 1,2,3,4       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 8    Leader: 2       Replicas: 2,4,1,3       Isr: 2
        Topic: __consumer_offsets       Partition: 9    Leader: 3       Replicas: 3,1,2,4       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 10   Leader: 4       Replicas: 4,2,3,1       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 11   Leader: 1       Replicas: 1,3,4,2       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 12   Leader: 2       Replicas: 2,1,3,4       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 13   Leader: 3       Replicas: 3,2,4,1       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 14   Leader: 4       Replicas: 4,3,1,2       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 15   Leader: 1       Replicas: 1,4,2,3       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 16   Leader: 2       Replicas: 2,3,4,1       Isr: 1,3,4,2
        Topic: __consumer_offsets       Partition: 17   Leader: 3       Replicas: 3,4,1,2       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 18   Leader: 4       Replicas: 4,1,2,3       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 19   Leader: 1       Replicas: 1,2,3,4       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 20   Leader: 2       Replicas: 2,4,1,3       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 21   Leader: 3       Replicas: 3,1,2,4       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 22   Leader: 4       Replicas: 4,2,3,1       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 23   Leader: 1       Replicas: 1,3,4,2       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 24   Leader: 2       Replicas: 2,1,3,4       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 25   Leader: 3       Replicas: 3,2,4,1       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 26   Leader: 4       Replicas: 4,3,1,2       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 27   Leader: 1       Replicas: 1,4,2,3       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 28   Leader: 2       Replicas: 2,3,4,1       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 29   Leader: 3       Replicas: 3,4,1,2       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 30   Leader: 4       Replicas: 4,1,2,3       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 31   Leader: 1       Replicas: 1,2,3,4       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 32   Leader: 2       Replicas: 2,4,1,3       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 33   Leader: 3       Replicas: 3,1,2,4       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 34   Leader: 4       Replicas: 4,2,3,1       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 35   Leader: 1       Replicas: 1,3,4,2       Isr: 1,3,4,2
        Topic: __consumer_offsets       Partition: 36   Leader: 2       Replicas: 2,1,3,4       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 37   Leader: 3       Replicas: 3,2,4,1       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 38   Leader: 4       Replicas: 4,3,1,2       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 39   Leader: 1       Replicas: 1,4,2,3       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 40   Leader: 2       Replicas: 2,3,4,1       Isr: 2
        Topic: __consumer_offsets       Partition: 41   Leader: 3       Replicas: 3,4,1,2       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 42   Leader: 4       Replicas: 4,1,2,3       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 43   Leader: 1       Replicas: 1,2,3,4       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 44   Leader: 2       Replicas: 2,4,1,3       Isr: 2
        Topic: __consumer_offsets       Partition: 45   Leader: 3       Replicas: 3,1,2,4       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 46   Leader: 4       Replicas: 4,2,3,1       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 47   Leader: 1       Replicas: 1,3,4,2       Isr: 1,4,3,2
        Topic: __consumer_offsets       Partition: 48   Leader: 2       Replicas: 2,1,3,4       Isr: 2
        Topic: __consumer_offsets       Partition: 49   Leader: 3       Replicas: 3,2,4,1       Isr: 1,4,3,2
[kafka@zx001 kafka]$
发表于 2019-04-02
添加评论

是的,部分消费者会受影响。
节点恢复后会自行恢复。

ighack -> 半兽人 5年前

我想问一下如何恢复这些失效的节点。只能重启吗?

半兽人 -> ighack 5年前

嗯 系统级别的故障。失效的节点只能通过重启恢复

你的答案

查看kafka相关的其他问题或提一个您自己的问题