public class ZkClusterDescriber extends Object implements org.apache.kafka.metadata.placement.ClusterDescriber
Constructor and Description |
---|
ZkClusterDescriber(org.apache.kafka.common.Cluster cluster,
org.apache.kafka.metadata.placement.CellDescriber cellDescriber,
org.apache.kafka.metadata.placement.TenantDescriber tenantDescriber) |
Modifier and Type | Method and Description |
---|---|
int |
getTenantCellId(String tenant) |
static List<List<Integer>> |
partitionInfosToReplicas(List<org.apache.kafka.common.PartitionInfo> partitions) |
List<List<Integer>> |
replicasForTopicName(String topicName) |
Iterator<String> |
topicNames() |
Iterator<org.apache.kafka.metadata.placement.UsableBroker> |
usableBrokers() |
public ZkClusterDescriber(org.apache.kafka.common.Cluster cluster, org.apache.kafka.metadata.placement.CellDescriber cellDescriber, org.apache.kafka.metadata.placement.TenantDescriber tenantDescriber)
public static List<List<Integer>> partitionInfosToReplicas(List<org.apache.kafka.common.PartitionInfo> partitions)
public Iterator<org.apache.kafka.metadata.placement.UsableBroker> usableBrokers()
usableBrokers
in interface org.apache.kafka.metadata.placement.ClusterDescriber
public Iterator<String> topicNames()
topicNames
in interface org.apache.kafka.metadata.placement.ClusterDescriber
public List<List<Integer>> replicasForTopicName(String topicName)
replicasForTopicName
in interface org.apache.kafka.metadata.placement.ClusterDescriber
public int getTenantCellId(String tenant)
getTenantCellId
in interface org.apache.kafka.metadata.placement.TenantDescriber