public class DiskCapacityGoal extends CapacityGoal
balancingConstraint, finished, minMonitoredPartitionPercentage, numWindows, optimizationResultBuilder, proposalStatsBuilder
Constructor and Description |
---|
DiskCapacityGoal()
Constructor for Disk Capacity Goal.
|
Modifier and Type | Method and Description |
---|---|
String |
name()
Get the name of this goal.
|
ActionAcceptance |
replicaActionAcceptance(ReplicaBalancingAction action,
ClusterModel clusterModel)
Check whether the given action is acceptable by this goal.
|
protected Resource |
resource() |
brokersToBalance, clusterModelCompletenessRequirements, eligibleBrokersReplicaMove, finish, initGoalState, isHardGoal, partitionActionAcceptance, partitionActionSelfSatisfied, rebalanceForBroker, replicaActionSelfSatisfied, shouldExcludeForReplicaMove, updateGoalState
changeObservership, configure, maybeApplyBalancingAction, maybeApplyBalancingAction, maybeMoveReplicaBetweenDisks, optimize, proposalTrackingOptions, relocateReplica, selfSatisfied, shouldExclude, shouldExclude, shouldTryLeadershipMovement, toString, tryAcceptProposal, updateReplicationFactor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
actionAcceptance, canChangeReplicationFactor, clusterModelStatsComparator, optimize
protected Resource resource()
resource
in class CapacityGoal
public ActionAcceptance replicaActionAcceptance(ReplicaBalancingAction action, ClusterModel clusterModel)
CapacityGoal
replicaActionAcceptance(ReplicaBalancingAction, ClusterModel)
and
NetworkInboundCapacityGoal.replicaActionAcceptance(ReplicaBalancingAction, ClusterModel)
).
(1) Check if leadership NW_OUT movement is acceptable: NW_OUT movement carries all of leader's NW_OUT load.
(2) Check if leadership CPU movement is acceptable: In reality, CPU movement carries only a fraction of
leader's CPU load.
To optimize CC performance, we avoid calculation of the expected leadership CPU utilization, and assume that
if (action.balancingAction() == ActionType.LEADERSHIP_MOVEMENT && resource() == Resource.CPU),
then the expected leadership CPU utilization would be the full CPU utilization of the leader.
(3) Check if leadership PRODUCE_IN movement is acceptable; Producers only produce to the leader replica.
## Replica Movement: impacts any resource. ## Replica Swap: impacts any resource.
replicaActionAcceptance
in interface GoalBalancingActionAcceptance
replicaActionAcceptance
in class CapacityGoal
action
- Action to be checked for acceptance.clusterModel
- The state of the cluster.ActionAcceptance.ACCEPT
if the action is acceptable by this goal,
ActionAcceptance.REPLICA_REJECT
otherwise.public String name()
CapacityGoal
name
in interface Goal
name
in class CapacityGoal