public class NetworkInboundCapacityGoal extends CapacityGoal
Goal.ClusterModelStatsComparator
_balancingConstraint, _finished, _minMonitoredPartitionPercentage, _numWindows, _succeeded
Constructor and Description |
---|
NetworkInboundCapacityGoal()
Constructor for Network Inbound Capacity Goal.
|
Modifier and Type | Method and Description |
---|---|
ActionAcceptance |
actionAcceptance(BalancingAction action,
ClusterModel clusterModel)
Check whether the given action is acceptable by this goal.
|
java.lang.String |
name()
Get the name of this goal.
|
protected Resource |
resource() |
brokersToBalance, clusterModelCompletenessRequirements, clusterModelStatsComparator, finish, initGoalState, isHardGoal, rebalanceForBroker, selfSatisfied, updateGoalState
configure, maybeApplyBalancingAction, maybeMoveReplicaBetweenDisks, optimize, shouldExclude, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canChangeReplicationFactor
public NetworkInboundCapacityGoal()
protected Resource resource()
resource
in class CapacityGoal
public ActionAcceptance actionAcceptance(BalancingAction action, ClusterModel clusterModel)
CapacityGoal
DiskCapacityGoal.actionAcceptance(BalancingAction, ClusterModel)
and
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 java.lang.String name()
CapacityGoal
name
in interface Goal
name
in class CapacityGoal