Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

KIP Authors: Edoardo Comar and Mickael Maison

Motivation

When using TopicCommand --describe, it does not show if a topic is marked for deletion. Such information is only displayed when using --list. It would be helpful to have the --describe command  command include all details instead of having to go back and forth between multiple commands.

Moreover when using TopicCommand --describe with  with --under-replicated-partitions or  or --unavailable-partitions, topics marked for deletion are listed without being marked appropriately which can be confusing!

...

The change would only be in the output of TopicCommand when using the --describe flag flag. This is the class called by the kafka-topics.sh script script.

Proposed Changes

If a topic is marked for deletion, --describe will  will return the following:

 Topic:testtopic    PartitionCount:1    ReplicationFactor:1    Configs:cleanup.policy=compact,flush.ms=1000    MarkedForDeletion:true

...

 Topic: testtopic    Partition: 0    Leader: none    Replicas: 0    Isr:

Compatibility, Deprecation, and Migration Plan

...

We tried reusing the same string used by --list ("- marked for deletion") but we found the output inconsistent compared to the other fields in --describe.

Topic:testtopic    PartitionCount:1    ReplicationFactor:1    Configs:cleanup.policy=compact,flush.ms=1000    - marked for deletion

...

Topic: testtopic    Partition: 0    Leader: none    Replicas: 0    Isr: