public static class MetadataClient.ClusterMetadata extends Object
Constructor and Description |
---|
ClusterMetadata(org.apache.kafka.common.Cluster cluster,
Optional<Map<String,org.apache.kafka.metadata.TopicPlacement>> topicPlacements,
Map<Integer,String> brokerReplicaExclusions,
Set<org.apache.kafka.common.TopicPartition> reassigningPartitions) |
ClusterMetadata(org.apache.kafka.common.Cluster cluster,
Optional<Map<String,org.apache.kafka.metadata.TopicPlacement>> topicPlacements,
Map<Integer,String> brokerReplicaExclusions,
Set<org.apache.kafka.common.TopicPartition> reassigningPartitions,
Set<org.apache.kafka.common.message.DescribeTenantsResponseData.TenantDescription> tenantsDescription,
Map<Integer,org.apache.kafka.common.message.DescribeCellsResponseData.Cell> brokerIdToCellDescription,
Map<Integer,List<String>> degradedBrokers) |
Modifier and Type | Method and Description |
---|---|
Map<Integer,org.apache.kafka.common.message.DescribeCellsResponseData.Cell> |
brokerIdToCellDescription() |
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<org.apache.kafka.common.message.DescribeTenantsResponseData.TenantDescription> |
tenants()
Returns all the tenants in the cluster.
|
Optional<Map<String,org.apache.kafka.metadata.TopicPlacement>> |
topicPlacements() |
String |
toString() |
public ClusterMetadata(org.apache.kafka.common.Cluster cluster, Optional<Map<String,org.apache.kafka.metadata.TopicPlacement>> topicPlacements, Map<Integer,String> brokerReplicaExclusions, Set<org.apache.kafka.common.TopicPartition> reassigningPartitions)
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 ClusterMetadata(org.apache.kafka.common.Cluster cluster, Optional<Map<String,org.apache.kafka.metadata.TopicPlacement>> topicPlacements, Map<Integer,String> brokerReplicaExclusions, Set<org.apache.kafka.common.TopicPartition> reassigningPartitions, Set<org.apache.kafka.common.message.DescribeTenantsResponseData.TenantDescription> tenantsDescription, Map<Integer,org.apache.kafka.common.message.DescribeCellsResponseData.Cell> brokerIdToCellDescription, 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 reassignedtenantsDescription
- - set of tenants that are currently in the clusterbrokerIdToCellDescription
- - broker to cell description mappingdegradedBrokers
- - a map where the key is the broker id and the value is the reason that broker is degraded.public org.apache.kafka.common.Cluster cluster()
public Optional<Map<String,org.apache.kafka.metadata.TopicPlacement>> topicPlacements()
public Map<Integer,String> replicaExclusions()
public Map<Integer,List<String>> degradedBrokers()
ConfluentAdmin#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()
public Set<org.apache.kafka.common.message.DescribeTenantsResponseData.TenantDescription> tenants()
public Map<Integer,org.apache.kafka.common.message.DescribeCellsResponseData.Cell> brokerIdToCellDescription()