PreferredReplicaLeaderElection Controller Event

PreferredReplicaLeaderElection is a controller event that transition the KafkaController to ManualLeaderBalance state.

PreferredReplicaLeaderElection takes the following to be created:

  • Partitions (Option[Set[TopicPartition]])

  • Election type (default: ZkTriggered)

  • Elect Preferred Leaders Callback (default: (_, _) ⇒ {})

PreferredReplicaLeaderElection is enqueued when KafkaController is requested for the following:

Note
FIXME When removePartitionsFromPreferredReplicaElection and isTriggeredByAutoRebalance flag is off?

When created, PreferredReplicaLeaderElection is given the optional partitions and the electionType as follows:

Processing PreferredReplicaLeaderElection

When processed (on the controller-event-thread), KafkaController is requested to processPreferredReplicaLeaderElection.

Preempting PreferredReplicaLeaderElection

When preempted, KafkaController is requested to preemptPreferredReplicaLeaderElection.

Election Type

Election type can be one of the following:

  • AutoTriggered

  • ZkTriggered

  • AdminClientTriggered

results matching ""

    No results matching ""