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

AdminUtils.fetchTopicMetadataFromZk is not available in 1.0.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 1.0.0
    • None
    • admin
    • None

    Description

      Not sure why this function is deleted (https://github.com/apache/kafka/commit/1d24e10aeab616eede416201336e928b9a8efa98#diff-5d4a4a97554d3ac24efe68d98eb27b64)

      Our code was relying on it.

      final MetadataResponse.TopicMetadata topicMetadata = AdminUtils.fetchTopicMetadataFromZk(topicName, zkUtils);
      final Topic topic = new Topic();
      topic.setPartitions(topicMetadata.partitionMetadata().size());
      final int replicas = topicMetadata.partitionMetadata().stream().mapToInt(e -> e.replicas().size()).sum();
      topic.setReplications(replicas);

      Is there any alternatives?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ewangchong Chong Wang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: