kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apurva Mehta <apu...@confluent.io>
Subject Re: Leader imbalance issue
Date Fri, 20 Jan 2017 19:16:52 GMT
Hi Meghana,

Have you tried using the 'kafka-prefered-replica-election.sh' script? It
will try to move leaders back to the preferred replicas when there is a
leader imbalance.

https://cwiki.apache.org/confluence/display/KAFKA/Replication+tools#Replicationtools-1.PreferredReplicaLeaderElectionTool

Thanks,
Apurva


On Fri, Jan 20, 2017 at 8:29 AM, Meghana Narasimhan <
mnarasimhan@bandwidth.com> wrote:

> Hi,
> Any input on this will be of great help . A rolling restart could fix the
> issue but not sure if thats the right way to do it.
>
> Thanks,
> Meghana
>
> On Wed, Jan 18, 2017 at 9:46 AM, Meghana Narasimhan <
> mnarasimhan@bandwidth.com> wrote:
>
> > Hi,
> >
> > We have a 3 node cluster with 0.9.0.1 version. The controller is
> reporting
> > that one of the brokers has a leader imbalance.
> > One of the topics with 120 partitions has Broker 0 and 2 acting as
> leaders
> > for all its partitions.None of the partitions have Broker 1 as their
> leader.
> >
> > So the controller log reports a list of  partitions  for those topics not
> > being in the preferred
> > replica Map and also leader imbalance.
> >
> > DEBUG [Controller 1]: topics not in preferred replica Map([test,48] ->
> > List(1, 2, 0), [test,54] -> List(1, 2, 0)............................
> ...)
> > TRACE [Controller 1]: leader imbalance ratio for broker 1 is 0.086957
> > (kafka.controller.KafkaController)
> >
> > I believe broker 1 got into this state because of an issue on that broker
> > a few weeks backup
> > which crashed Kafka on that node. Later the corrupted log was identified
> > and restored.
> > But looks like since then that Broker hasn't been leader for that topic.
> >
> > What is the correct way to fix the issue of leader imbalance ?
> >
> > Thanks,
> > Meghana
> >
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message