TopicDeletionManager

TopicDeletionManager is…​FIXME

TopicDeletionManager is created exclusively when KafkaController is created.

TopicDeletionManager.png
Figure 1. TopicDeletionManager is Created Alongside KafkaController

TopicDeletionManager is controlled by delete.topic.enable Kafka property and does nothing when it is turned off (i.e. false).

Table 1. TopicDeletionManager’s Internal Properties (e.g. Registries and Counters)
Name Description

partitionsToBeDeleted

TopicAndPartitions to be deleted

topicsToBeDeleted

The names of the topics to be deleted

topicsIneligibleForDeletion

The names of the topics that must not be deleted (i.e. are ineligible for deletion)

TopicDeletionManager uses [Topic Deletion Manager [brokerId]] as the logging prefix (aka logIdent).

Tip

Enable INFO logging level for kafka.controller.TopicDeletionManager logger to see what happens inside.

Add the following line to config/log4j.properties:

log4j.logger.kafka.controller.TopicDeletionManager=INFO

Refer to Logging.

startReplicaDeletion Internal Method

Caution
FIXME

enqueueTopicsForDeletion Method

Caution
FIXME

failReplicaDeletion Method

Caution
FIXME

Creating TopicDeletionManager Instance

TopicDeletionManager takes the following when created:

TopicDeletionManager initializes the internal registries and counters.

markTopicIneligibleForDeletion Method

markTopicIneligibleForDeletion(topics: Set[String]): Unit

(only with delete.topic.enable Kafka property enabled) markTopicIneligibleForDeletion computes the intersection between topicsToBeDeleted and the input topics sets and adds the intersection to topicsIneligibleForDeletion set.

If there are any topics in the intersection, markTopicIneligibleForDeletion prints out the following INFO message to the logs:

Halted deletion of topics [newTopicsToHaltDeletion]
Note

markTopicIneligibleForDeletion is used when:

Reseting — reset Method

reset(): Unit

(only with delete.topic.enable Kafka property enabled) reset removes all elements from the following internal registries:

Note
reset does nothing when delete.topic.enable Kafka property is false.
Note
reset is used exclusively when KafkaController resigns as the active controller.

onTopicDeletion Internal Method

onTopicDeletion(topics: Set[String]): Unit

onTopicDeletion…​FIXME

Note
onTopicDeletion is used when…​FIXME

completeDeleteTopic Internal Method

completeDeleteTopic(topic: String): Unit

completeDeleteTopic…​FIXME

Note
completeDeleteTopic is used when…​FIXME

Initializing — init Method

init(
  initialTopicsToBeDeleted: Set[String],
  initialTopicsIneligibleForDeletion: Set[String]): Unit

init…​FIXME

Note
init is used when…​FIXME

tryTopicDeletion Method

tryTopicDeletion(): Unit

tryTopicDeletion…​FIXME

Note
tryTopicDeletion is used when…​FIXME

isTopicQueuedUpForDeletion Method

isTopicQueuedUpForDeletion(topic: String): Boolean

isTopicQueuedUpForDeletion…​FIXME

Note
isTopicQueuedUpForDeletion is used when…​FIXME

results matching ""

    No results matching ""