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

startReplicaDeletion(replicasForTopicsToBeDeleted: Set[PartitionAndReplica]): Unit

startReplicaDeletion…​FIXME

Note
startReplicaDeletion is used when…​FIXME

enqueueTopicsForDeletion Method

enqueueTopicsForDeletion(topics: Set[String]): Unit

enqueueTopicsForDeletion…​FIXME

Note
enqueueTopicsForDeletion is used when…​FIXME

failReplicaDeletion Method

failReplicaDeletion(replicas: Set[PartitionAndReplica]): Unit

failReplicaDeletion…​FIXME

Note
failReplicaDeletion is used when…​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

resumeDeletionForTopics Method

resumeDeletionForTopics(topics: Set[String] = Set.empty): Unit

resumeDeletionForTopics…​FIXME

Note
resumeDeletionForTopics is used when…​FIXME

completeReplicaDeletion Method

completeReplicaDeletion(replicas: Set[PartitionAndReplica]): Unit

completeReplicaDeletion…​FIXME

Note
completeReplicaDeletion is used when…​FIXME

markTopicForDeletionRetry Internal Method

markTopicForDeletionRetry(topic: String): Unit

markTopicForDeletionRetry…​FIXME

Note
markTopicForDeletionRetry is used when…​FIXME

retryDeletionForIneligibleReplicas Internal Method

retryDeletionForIneligibleReplicas(topic: String): Unit

retryDeletionForIneligibleReplicas…​FIXME

Note
retryDeletionForIneligibleReplicas is used when…​FIXME

results matching ""

    No results matching ""