You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.

Status

Current state:  Under Discussion

Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]

JIRA: here 

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

Currently AdminClient supports describeTopics(Collection<String> topicNames) method for describing topics and listTopics() for topic name listing.
To describe all topics, users currently use listTopics() to get all topic names and pass the name list to describeTopics.
Since "describe all topics" is a common operation, We propose to add describeTopics() method to get all topic descriptions in single call.
This will be simple to use and avoids additional metadata requests.

Public Interfaces


/**
 * Describe all topics in the cluster, with the default options.
 */
public DescribeAllTopicsResult describeTopics() {
    return describeTopics(new DescribeTopicsOptions());
}

/**
 * Describe all topics in the cluster.
 *
 * @return                  The DescribeAllTopicsResult.
 */
public abstract DescribeAllTopicsResult describeTopics(DescribeTopicsOptions options);




/**
 * The result of the {@link KafkaAdminClient#describeTopics()} call.
 */
public class DescribeAllTopicsResult {
    private final KafkaFuture<Collection<TopicDescription>> future;

    DescribeAllTopicsResult(KafkaFuture<Collection<TopicDescription>> future) {
        this.future = future;
    }

    public KafkaFuture<Collection<TopicDescription>> value() {
        return future;
    }
}



Proposed Changes

Describe the new thing you want to do in appropriate detail. This may be fairly extensive and have large subsections of its own. Or it may be a few sentences. Use judgement based on the scope of the change.

Compatibility, Deprecation, and Migration Plan

  • What impact (if any) will there be on existing users?
  • If we are changing behavior how will we phase out the older behavior?
  • If we need special migration tools, describe them here.
  • When will we remove the existing behavior?

Rejected Alternatives

If there are alternative ways of accomplishing the same thing, what were they? The purpose of this section is to motivate why the design is the way it is and not some other way.

  • No labels