0

we have ( 3 kafka machines )

kafka brokers id's - are ( 101 , 102 ,103 )

ambari version - 2.6.1

hadoop version 2.6.5

29 datanode machines

3 journal machines ( master machines )

when we run the following command

kafka-topics.sh --zookeeper 10.231.23.45:2181 –describe

we see the description of the leaders and replications

but what is wrong here is we see only two leaders for each topic

in our case the topic name - MLK_PLW_QA , but the same situation is on all the topics

Topic:MLK_PLW_QA    PartitionCount:100  ReplicationFactor:3 Configs:retention.bytes=9239504949
    Topic: MLK_PLW_QA   Partition: 0    Leader: 102 Replicas: 102,101,103   Isr: 101,102,103
    Topic: MLK_PLW_QA   Partition: 1    Leader: 102 Replicas: 103,102,101   Isr: 101,102
    Topic: MLK_PLW_QA   Partition: 2    Leader: 101 Replicas: 101,103,102   Isr: 101,102,103
    Topic: MLK_PLW_QA   Partition: 3    Leader: 102 Replicas: 102,103,101   Isr: 101,102,103
    Topic: MLK_PLW_QA   Partition: 4    Leader: 101 Replicas: 103,101,102   Isr: 101,102
    Topic: MLK_PLW_QA   Partition: 5    Leader: 101 Replicas: 101,102,103   Isr: 101,102,103
    Topic: MLK_PLW_QA   Partition: 6    Leader: 102 Replicas: 102,101,103   Isr: 101,102,103
    Topic: MLK_PLW_QA   Partition: 7    Leader: 102 Replicas: 103,102,101   Isr: 101,102

I must to say that this situation not appears before couple days , and we see all leaders 101 , 102 , 103 ( from kafka-topics.sh --zookeeper 10.231.23.45:2181 –describe )

what are the reasons that broker id - 103 not appears as leader ?

note - all kafka brokers services are running ( we can see that from ambari gui )

Judy
  • 1,595
  • 6
  • 19
  • 41

1 Answers1

1

One possibility, node with broker id 103 may be crashed/stopped or was down for a while. So cluster did a rebalance and selected the new leader from available nodes. Even though now broker 103 is alive, cluster controller didn't change the leadership of topics to optimize the computing.

Steephen
  • 14,645
  • 7
  • 40
  • 47
  • yes , after I review on the server.log in kafka03 we saw that - INFO [ReplicaFetcherThread-0-103], Shutting down (kafka.server.ReplicaFetcherThread) , but we not understand what cause the broker to shutdown ( I will open a new thred about this question ) – Judy Jan 17 '19 at 09:50