public class DiskCapacityGoal extends CapacityGoal
Goal.ClusterModelStatsComparator
balancingConstraint, finished, minMonitoredPartitionPercentage, numWindows, optimizationResultBuilder
Constructor and Description |
---|
DiskCapacityGoal()
Constructor for Disk Capacity Goal.
|
Modifier and Type | Method and Description |
---|---|
ActionAcceptance |
actionAcceptance(BalancingAction action,
ClusterModel clusterModel)
Check whether the given action is acceptable by this goal.
|
String |
name()
Get the name of this goal.
|
protected Resource |
resource() |
brokersToBalance, clusterModelCompletenessRequirements, finish, initGoalState, isHardGoal, rebalanceForBroker, selfSatisfied, updateGoalState
changeObservership, configure, maybeApplyBalancingAction, maybeMoveReplicaBetweenDisks, optimize, shouldExclude, toString, updateReplicationFactor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canChangeReplicationFactor, clusterModelStatsComparator
protected Resource resource()
resource
in class CapacityGoal
public ActionAcceptance actionAcceptance(BalancingAction action, ClusterModel clusterModel)
CapacityGoal
actionAcceptance(BalancingAction, ClusterModel)
and
NetworkInboundCapacityGoal.actionAcceptance(BalancingAction, 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.
## Replica Movement: impacts any resource. ## Replica Swap: impacts any resource.
actionAcceptance
in interface Goal
actionAcceptance
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