public final class ClusterModelHelper extends Object
ClusterModel
.Constructor and Description |
---|
ClusterModelHelper() |
Modifier and Type | Method and Description |
---|---|
static Set<Broker> |
brokersWithUtilizationOverLowUtilizationRatioThreshold(Collection<Broker> brokers,
ResourceUtilizationRatioThresholdsProvider thresholds)
Returns the set of brokers whose utilization is crossing the resource's threshold low utilization ratio as
described by the
ResourceUtilizationRatioThresholdsProvider.lowUtilizationRatio(Broker) . |
static Set<Broker> |
brokersWithUtilizationOverThreshold(Collection<Broker> originalBrokers,
Resource resource,
double utilizationThreshold)
Returns the set of brokers whose utilization is crossing the resource's capacity multiplied by the
utilizationThreshold.
|
static Set<Broker> |
brokersWithUtilizationUnderCapacity(Collection<Broker> brokers,
Resource resource,
ClusterModel.CapacityLimitProvider capacityLimitProvider)
Returns the set of brokers whose utilization is crossing the resource's capacity provided by the
ClusterModel.CapacityLimitProvider . |
static Set<Broker> |
brokersWithUtilizationUnderCapacityThreshold(Collection<Broker> brokers,
Resource resource,
ClusterModel.ThresholdProvider thresholdProvider)
Returns all brokers which utilization is under the capacity capped threshold of the broker or the host (depending
on the resource type).
|
static Set<Broker> |
brokersWithUtilizationUnderCapacityThreshold(Collection<Broker> brokers,
Resource resource,
double capacityThreshold)
Returns all brokers which utilization is under the capacity capped threshold of the broker or the host (depending
on the resource type).
|
static ResourceStats |
resourceStatsFor(Broker broker,
Resource resource)
Returns the resource stats object corresponding to the resource type.
|
public static Set<Broker> brokersWithUtilizationUnderCapacityThreshold(Collection<Broker> brokers, Resource resource, double capacityThreshold)
brokers
- the group of brokers which we have to check.resource
- the resource that we're interested in.capacityThreshold
- the capacity limiter [0-1].public static Set<Broker> brokersWithUtilizationUnderCapacityThreshold(Collection<Broker> brokers, Resource resource, ClusterModel.ThresholdProvider thresholdProvider)
brokers
- the group of brokers which we have to check.resource
- the resource that we're interested in.thresholdProvider
- the threshold provider used for the capacity multiplier [0-1].public static Set<Broker> brokersWithUtilizationUnderCapacity(Collection<Broker> brokers, Resource resource, ClusterModel.CapacityLimitProvider capacityLimitProvider)
ClusterModel.CapacityLimitProvider
.public static Set<Broker> brokersWithUtilizationOverThreshold(Collection<Broker> originalBrokers, Resource resource, double utilizationThreshold)
public static Set<Broker> brokersWithUtilizationOverLowUtilizationRatioThreshold(Collection<Broker> brokers, ResourceUtilizationRatioThresholdsProvider thresholds)
ResourceUtilizationRatioThresholdsProvider.lowUtilizationRatio(Broker)
.public static ResourceStats resourceStatsFor(Broker broker, Resource resource)
broker
- the broker in interestresource
- the resource in interest