Kafka
  1. Kafka
  2. KAFKA-850

add an option to show under replicated partitions in list topic command

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.0
    • Component/s: core
    • Labels:
      None

      Description

      For debugging purpose, it's very important to be able to find out the under replicated partitions quickly. List topic command is a good place to add this feature.

      1. kafka-850_v2.patch
        3 kB
        Jun Rao
      2. kafka-850_v3.patch
        5 kB
        Jun Rao
      3. kafka-850.patch
        3 kB
        Jun Rao

        Activity

        Jun Rao made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 0.8 [ 12317244 ]
        Resolution Fixed [ 1 ]
        Hide
        Jun Rao added a comment -

        Thanks for the review. Committed to 0.8 with the suggested changes.

        Show
        Jun Rao added a comment - Thanks for the review. Committed to 0.8 with the suggested changes.
        Hide
        Neha Narkhede added a comment -

        Also +1 once those comments are addressed.

        Show
        Neha Narkhede added a comment - Also +1 once those comments are addressed.
        Hide
        Neha Narkhede added a comment -

        Thanks for the patch. Minor comments -

        ListTopicCommand-
        1.1 Typo in ListTopicCommand -> "partiitons"
        1.2 Why do we print the topic separately like this ? It becomes quite unwieldily to parse the output where one line just has topic, but not the partitions and replicas. Also, we print the topic anyways with the rest of the partition and replica info. So I think we can remove this
        if (!reportUnderReplicatedPartitions && !reportUnavailablePartitions)
        println("topic: " + topic)

        Show
        Neha Narkhede added a comment - Thanks for the patch. Minor comments - ListTopicCommand- 1.1 Typo in ListTopicCommand -> "partiitons" 1.2 Why do we print the topic separately like this ? It becomes quite unwieldily to parse the output where one line just has topic, but not the partitions and replicas. Also, we print the topic anyways with the rest of the partition and replica info. So I think we can remove this if (!reportUnderReplicatedPartitions && !reportUnavailablePartitions) println("topic: " + topic)
        Jun Rao made changes -
        Attachment kafka-850_v3.patch [ 12577320 ]
        Hide
        Jun Rao added a comment -

        Attach patch v3 by also adding an option to show unavailable partitions.

        Show
        Jun Rao added a comment - Attach patch v3 by also adding an option to show unavailable partitions.
        Jun Rao made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Jun Rao made changes -
        Attachment kafka-850_v2.patch [ 12577260 ]
        Hide
        Jun Rao added a comment -

        Attach patch v2 after rebase.

        Show
        Jun Rao added a comment - Attach patch v2 after rebase.
        Hide
        Neha Narkhede added a comment -

        I meant to review this earlier but got busy fixing KAFKA-849 and KAFKA-851. Looks like this patch needs to be rebased due to the changes in those patches. Please can you rebase ?

        Show
        Neha Narkhede added a comment - I meant to review this earlier but got busy fixing KAFKA-849 and KAFKA-851 . Looks like this patch needs to be rebased due to the changes in those patches. Please can you rebase ?
        Jun Rao made changes -
        Field Original Value New Value
        Attachment kafka-850.patch [ 12577005 ]
        Hide
        Jun Rao added a comment -

        Attach a patch.

        1. Add an option to show only under replicated partitions.

        2. Also addressed an existing issues: If one of the broker is down, the whole replica list is not shown. The fix only shows the broker id, not the broker host/port. Repeating the host/port info in each replica is probably redundant any way.

        Show
        Jun Rao added a comment - Attach a patch. 1. Add an option to show only under replicated partitions. 2. Also addressed an existing issues: If one of the broker is down, the whole replica list is not shown. The fix only shows the broker id, not the broker host/port. Repeating the host/port info in each replica is probably redundant any way.
        Jun Rao created issue -

          People

          • Assignee:
            Jun Rao
            Reporter:
            Jun Rao
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development