@InterfaceStability.Unstable
public interface SubscribedTopicDescriber
PartitionAssignor
to obtain topic and partition metadata of the subscribed topics.
The interface is kept in an internal module until KIP-848 is fully
implemented and ready to be released.| Modifier and Type | Method and Description |
|---|---|
int |
numPartitions(org.apache.kafka.common.Uuid topicId)
The number of partitions for the given topic Id.
|
Set<String> |
racksForPartition(org.apache.kafka.common.Uuid topicId,
int partition)
Returns all the available racks associated with the replicas of the given partition.
|
int numPartitions(org.apache.kafka.common.Uuid topicId)
topicId - Uuid corresponding to the topic.Set<String> racksForPartition(org.apache.kafka.common.Uuid topicId, int partition)
topicId - Uuid corresponding to the partition's topic.partition - Partition Id within topic.