public class HotPartitionsInfo extends Object
Constructor and Description |
---|
HotPartitionsInfo(Map<Integer,List<org.apache.kafka.common.TopicPartition>> hotPartitionsByBroker,
Map<org.apache.kafka.common.TopicPartition,Double> hotPartitionsWithCorrespondingUsages,
Map<Replica,Double> saturatedReplicasWithCorrespondingUsages,
double maxReplicaLoad) |
Modifier and Type | Method and Description |
---|---|
Map<Integer,List<org.apache.kafka.common.TopicPartition>> |
hotPartitionsByBroker()
For each broker, returns the TopicPartitions currently hosted by the broker which are "hot" for given resource,
i.e.
|
String |
hotPartitionsLog(String goalName,
Resource resource,
double hotPartitionUtilizationThreshold)
Used to log "hot" partitions in the cluster if any exist.
|
Map<org.apache.kafka.common.TopicPartition,Double> |
hotPartitionsWithCorrespondingUsages() |
double |
maxReplicaLoad()
The maximum load for given resource over all replicas
|
Set<Replica> |
saturatedReplicas()
The set of all replicas which are "saturated" for given resource,
i.e.
|
String |
saturatedReplicasLog(String goalName,
Resource resource)
Used when there are "saturated" replicas in the cluster, and we want to log them.
|
Map<Replica,Double> |
saturatedReplicasWithCorrespondingUsages()
For tests
|
int |
totalNumHotPartitions()
The total number of partitions with replicas which are "hot" for given resource
|
public final Map<Integer,List<org.apache.kafka.common.TopicPartition>> hotPartitionsByBroker()
public Map<org.apache.kafka.common.TopicPartition,Double> hotPartitionsWithCorrespondingUsages()
public Set<Replica> saturatedReplicas()
public double maxReplicaLoad()
public int totalNumHotPartitions()
public String saturatedReplicasLog(String goalName, Resource resource)
public String hotPartitionsLog(String goalName, Resource resource, double hotPartitionUtilizationThreshold)