Delete topics includes the following operations - 1.
This is the zookeeper listener that triggers all the state transitions for a partition
Invoked on the OfflinePartition,OnlinePartition->OnlinePartition state change.
Invoked on the OfflinePartition,OnlinePartition->OnlinePartition state change. It invokes the leader election API to elect a leader for the input offline partition
The topic of the offline partition
The offline partition
Specific leader selector (e.g., offline/reassigned/etc.)
This API is invoked by the partition change zookeeper listener
This API is invoked by the partition change zookeeper listener
The list of partitions that need to be transitioned to the target state
The state that the partitions should be moved to
Invoked on controller shutdown.
Invoked on successful controller election.
Invoked on successful controller election. First registers a topic change listener since that triggers all state transitions for partitions. Initializes the state of partitions by reading from zookeeper. Then triggers the OnlinePartition state change for all new or offline partitions.
This API invokes the OnlinePartition state change on all partitions in either the NewPartition or OfflinePartition state.
This API invokes the OnlinePartition state change on all partitions in either the NewPartition or OfflinePartition state. This is called on a successful controller election and on broker changes
This class represents the state machine for partitions. It defines the states that a partition can be in, and transitions to move the partition to another legal state. The different states that a partition can be in are - 1. NonExistentPartition: This state indicates that the partition was either never created or was created and then deleted. Valid previous state, if one exists, is OfflinePartition 2. NewPartition : After creation, the partition is in the NewPartition state. In this state, the partition should have replicas assigned to it, but no leader/isr yet. Valid previous states are NonExistentPartition 3. OnlinePartition : Once a leader is elected for a partition, it is in the OnlinePartition state. Valid previous states are NewPartition/OfflinePartition 4. OfflinePartition : If, after successful leader election, the leader for partition dies, then the partition moves to the OfflinePartition state. Valid previous states are NewPartition/OnlinePartition