TopicDeletion Controller Event

TopicDeletion is a ControllerEvent that is executed on the active KafkaController (and does nothing otherwise).

Note
TopicDeletion uses delete.topic.enable Kafka property.
Note
Topics to be deleted are created in /admin/delete_topics path in Zookeeper.

state is TopicDeletion.

process Method

process(): Unit
Note
process is a part of ControllerEvent Contract.
Note
process is executed on the active controller only (and does nothing otherwise).

process prints out the following DEBUG message to the logs:

Delete topics listener fired for topics [topicsToBeDeleted] to be deleted

process requests ControllerContext for allTopics and finds topics that are supposed to be deleted, but are not available in the Kafka cluster.

If there are any non-existent topics, process prints out the following WARN message to the logs and requests ZkUtils to deletePathRecursive /admin/delete_topics/[topicName] znode for every topic in the list.

Ignoring request to delete non-existing topics [nonExistentTopics]

process branches off per delete.topic.enable Kafka property.

process with delete.topic.enable Enabled

With delete.topic.enable enabled (i.e. true), process prints out the following INFO message to the logs:

Starting topic deletion for topics [topicsToBeDeleted]

process requests TopicDeletionManager to markTopicIneligibleForDeletion for topics to be deleted with partitions in controllerContext.partitionsBeingReassigned list.

process with delete.topic.enable Disabled

With delete.topic.enable disabled (i.e. false), process prints out the following INFO message to the logs (for every topic):

Removing /admin/delete_topics/[topicName] since delete topic is disabled

process requests ZkUtils to deletePath /admin/delete_topics/[topicName] znode (for every topic).

results matching ""

    No results matching ""