public class DiskUsageDistributionGoal extends ResourceDistributionGoal
ResourceDistributionAbstractGoal.ChangeType
fixOfflineReplicasOnly, initialResourceDistribution, moveImmigrantsOnly, requireLessLoad, requireMoreLoad, thresholds
balancingConstraint, finished, minMonitoredPartitionPercentage, numWindows, optimizationResultBuilder, proposalStatsBuilder
Constructor and Description |
---|
DiskUsageDistributionGoal()
Constructor for Resource Distribution Goal.
|
Modifier and Type | Method and Description |
---|---|
ModelCompletenessRequirements |
clusterModelCompletenessRequirements()
Specify the load requirements for this goal.
|
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, doRebalance, finish, isRebalanceByMovingLoadInCompleted, isRebalanceByMovingLoadOutCompleted, replicaActionSelfSatisfied, replicaFilter, updateGoalState, validatePercentages
clusterModelStatsComparator, initGoalState, isHardGoal, isLoadAboveBalanceLowerLimit, isLoadAboveBalanceLowerLimitAfterChange, isLoadUnderBalanceUpperLimit, isLoadUnderBalanceUpperLimitAfterChange, partitionActionSelfSatisfied, performLeadershipMovement, performReplicaMovement, rebalanceForBroker, sortName
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, optimize
public DiskUsageDistributionGoal()
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 ResourceDistributionAbstractGoal
action
- Action to be checked for acceptance.clusterModel
- State of the cluster before application of the action.public String name()
ResourceDistributionAbstractGoal
name
in interface Goal
name
in class ResourceDistributionAbstractGoal
public ModelCompletenessRequirements clusterModelCompletenessRequirements()
Goal
clusterModelCompletenessRequirements
in interface Goal
clusterModelCompletenessRequirements
in class ResourceDistributionAbstractGoal