Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4998

Add utility to convert between TopicPartition and PartitionInfo

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      A common usecase when working with manual assignments is to fetch information about the topics and partitions, and then do your assignment.
      The interface for fetching the metadata returns a List<PartitionInfo>, but assign requires a Collection<TopicPartition>.

      Converting between this classes is easy, but a bit verbose. Adding a simple conversion to a utility class, or on the classes themselves, would improve the API and user experience.

      Attachments

        Activity

          People

            Unassigned Unassigned
            TimoMeijer Timo Meijer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: