public static class MetadataClient.ClusterMetadata extends Object
Constructor and Description |
---|
ClusterMetadata(org.apache.kafka.common.Cluster cluster,
Optional<Map<String,kafka.common.TopicPlacement>> topicPlacements,
Map<Integer,String> brokerReplicaExclusions,
Set<org.apache.kafka.common.TopicPartition> reassigningPartitions,
Set<Tenant> tenants,
Map<Integer,List<String>> degradedBrokers) |
Modifier and Type | Method and Description |
---|---|
org.apache.kafka.common.Cluster |
cluster() |
Map<Integer,List<String>> |
degradedBrokers() |
Set<org.apache.kafka.common.TopicPartition> |
reassigningPartitions()
Returns the partitions that are currently being reassigned
|
Map<Integer,String> |
replicaExclusions() |
Set<Tenant> |
tenants()
Returns all the tenants in the cluster.
|
Optional<Map<String,kafka.common.TopicPlacement>> |
topicPlacements() |
String |
toString() |
public ClusterMetadata(org.apache.kafka.common.Cluster cluster, Optional<Map<String,kafka.common.TopicPlacement>> topicPlacements, Map<Integer,String> brokerReplicaExclusions, Set<org.apache.kafka.common.TopicPartition> reassigningPartitions, Set<Tenant> tenants, Map<Integer,List<String>> degradedBrokers)
cluster
- - the Kafka clustertopicPlacements
- - a map of topic names to their TopicPlacement
configurationsbrokerReplicaExclusions
- - a map of broker ids to the reason they're excluded for replica placementreassigningPartitions
- - the set of partitions that are currently being reassignedpublic org.apache.kafka.common.Cluster cluster()
public Map<Integer,String> replicaExclusions()
public Map<Integer,List<String>> degradedBrokers()
CloudAdmin.alterBrokerHealth(AlterBrokerHealthSpec, AlterBrokerHealthOptions)
alters a broker's health and marks it as degraded
Degraded brokers would be removed from leader and become follower for its partitions.public Set<org.apache.kafka.common.TopicPartition> reassigningPartitions()