public class BalancingConstraint extends Object
Constructor and Description |
---|
BalancingConstraint(BalancingConstraint original) |
BalancingConstraint(KafkaCruiseControlConfig config)
Constructor for Balancing Constraint.
|
Modifier and Type | Method and Description |
---|---|
double |
capacityThreshold(Resource resource)
Get the capacity threshold for the requested resource.
|
Double |
goalViolationDistributionThresholdMultiplier()
Get goal violation distribution threshold multiplier to be used in detection and fixing goal violations.
|
Double |
leaderReplicaBalancePercentage()
Get leader replica balance percentage for
LeaderReplicaDistributionGoal . |
double |
lowUtilizationThreshold(Resource resource)
Get the low utilization threshold for a resource.
|
Long |
maxReplicasPerBroker()
Get maximum number of replicas per broker.
|
Double |
replicaBalancePercentage()
Get replica balance percentage for
ReplicaDistributionGoal . |
double |
resourceBalancePercentage(Resource resource)
Get the balance percentage for the requested resource.
|
List<Resource> |
resources()
Get the balancing for different resources.
|
void |
setCapacityThreshold(double capacityThreshold)
Set alive resource capacity threshold for all resources.
|
Properties |
setProps(Properties props) |
void |
setResourceBalancePercentage(double resourceBalancePercentage)
Set a common resource balance percentage for all resources.
|
Double |
topicReplicaBalancePercentage()
Get topic replica balance percentage for
TopicReplicaDistributionGoal . |
String |
toString()
Get string representation of
BalancingConstraint . |
public BalancingConstraint(KafkaCruiseControlConfig config)
public BalancingConstraint(BalancingConstraint original)
public Properties setProps(Properties props)
public Long maxReplicasPerBroker()
public Double replicaBalancePercentage()
ReplicaDistributionGoal
.public Double leaderReplicaBalancePercentage()
LeaderReplicaDistributionGoal
.public Double topicReplicaBalancePercentage()
TopicReplicaDistributionGoal
.public Double goalViolationDistributionThresholdMultiplier()
public double resourceBalancePercentage(Resource resource)
resource
- Resource for which the balance percentage will be provided.public double capacityThreshold(Resource resource)
resource
- Resource for which the capacity threshold will be provided.public double lowUtilizationThreshold(Resource resource)
resource
- Resource for which the low utilization threshold will be provided.public void setResourceBalancePercentage(double resourceBalancePercentage)
resourceBalancePercentage
- Common balance percentage for all resources.public void setCapacityThreshold(double capacityThreshold)
capacityThreshold
- Common capacity threshold for all resources in alive brokers.public String toString()
BalancingConstraint
.