public class ResourceDistributionStatsSnapshot extends AbstractDistributionStatsSnapshot
Modifier and Type | Class and Description |
---|---|
static class |
ResourceDistributionStatsSnapshot.ResourceValueThresholds
A POJO that holds particular thresholds related to the balance of particular
Resource distribution, in absolute values. |
Modifier and Type | Method and Description |
---|---|
int |
cellId() |
int |
numBrokersUnderLowUtilizationThreshold() |
ResourceDistributionStatsSnapshot.ResourceValueThresholds |
resourceValueThresholds() |
String |
toString() |
static List<ResourceDistributionStatsSnapshot> |
tryCompute(Collection<BrokerResourceStats> brokerResourceStats,
ResourceUtilizationRatioThresholdsProvider thresholds)
Attempts to compute
ResourceDistributionStatsSnapshot per each cell in the cluster by converting the given
ResourceUtilizationRatioThresholdsProvider to absolute values and evaluating them against the respective lower,
upper balance limits and minimum utilization thresholds within its cell boundaries. |
maxBrokerResource, minBrokerResource
public int numBrokersUnderLowUtilizationThreshold()
public ResourceDistributionStatsSnapshot.ResourceValueThresholds resourceValueThresholds()
public static List<ResourceDistributionStatsSnapshot> tryCompute(Collection<BrokerResourceStats> brokerResourceStats, ResourceUtilizationRatioThresholdsProvider thresholds) throws IllegalArgumentException
ResourceDistributionStatsSnapshot
per each cell in the cluster by converting the given
ResourceUtilizationRatioThresholdsProvider
to absolute values and evaluating them against the respective lower,
upper balance limits and minimum utilization thresholds within its cell boundaries.
In the case of a cluster whose brokers have large differences in capacities, the computation will fail and an empty list will be returned.
IllegalArgumentException
- if no broker brokerResourceStats are given.public int cellId()