public class NetworkInboundUsageDistributionGoal extends ResourceDistributionGoal
ResourceDistributionGoal.ChangeType
Goal.ClusterModelStatsComparator
balancingConstraint, finished, minMonitoredPartitionPercentage, numWindows, optimizationResultBuilder, proposalStats
Constructor and Description |
---|
NetworkInboundUsageDistributionGoal()
Constructor for Resource Distribution Goal.
|
Modifier and Type | Method and Description |
---|---|
String |
name()
Get the name of this goal.
|
ActionAcceptance |
partitionActionAcceptance(PartitionBalancingAction action,
ClusterModel clusterModel)
Checks if the action on the partition specified by the
PartitionBalancingAction
is acceptable. |
ActionAcceptance |
replicaActionAcceptance(ReplicaBalancingAction action,
ClusterModel clusterModel)
Check whether given action is acceptable by this goal.
|
protected Resource |
resource() |
brokersToBalance, clusterModelCompletenessRequirements, clusterModelStatsComparator, finish, initGoalState, isHardGoal, partitionActionSelfSatisfied, rebalanceForBroker, replicaActionSelfSatisfied, updateGoalState, validatePercentages
changeObservership, configure, maybeApplyBalancingAction, maybeMoveReplicaBetweenDisks, optimize, relocateReplica, selfSatisfied, shouldExclude, shouldExclude, toString, tryAcceptProposal, updateReplicationFactor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
actionAcceptance, canChangeReplicationFactor, optimize
public NetworkInboundUsageDistributionGoal()
protected Resource resource()
resource
in class ResourceDistributionGoal
public ActionAcceptance replicaActionAcceptance(ReplicaBalancingAction action, ClusterModel clusterModel)
ResourceDistributionGoal
replicaActionAcceptance
in interface GoalBalancingActionAcceptance
replicaActionAcceptance
in class ResourceDistributionGoal
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 ActionAcceptance partitionActionAcceptance(PartitionBalancingAction action, ClusterModel clusterModel)
GoalBalancingActionAcceptance
PartitionBalancingAction
is acceptable.
For performance optimization purposes, it is recommended goals return the wider-level action acceptance first
(e.g ActionAcceptance.BROKER_REJECT
versus ActionAcceptance.REPLICA_REJECT
) as that helps
the proposal-generating logic short-circuit invalid proposal generations.partitionActionAcceptance
in interface GoalBalancingActionAcceptance
partitionActionAcceptance
in class ResourceDistributionGoal
action
- Action to be checked for acceptance.clusterModel
- State of the cluster before application of the action.public String name()
ResourceDistributionGoal
name
in interface Goal
name
in class ResourceDistributionGoal