public class MovementExclusionGoal extends AbstractAcceptanceGoal
MovementExclusionGoal
is a hard blocking goal which forbids replica moves-out from ineligible source broker or move-in to ineligible destination broker.
E.g. demoted brokers, excluded brokers and excluded topics.
For more information on exclusions, see ConfluentAdmin.alterLeadershipPriority(org.apache.kafka.clients.admin.AlterLeadershipPrioritySpec, org.apache.kafka.clients.admin.AlterLeadershipPriorityOptions)
, ConfluentAdmin.alterBrokerReplicaExclusions(Map)
and ConfluentConfigs.BALANCER_EXCLUDE_TOPIC_NAMES_CONFIG
.Constructor and Description |
---|
MovementExclusionGoal() |
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)
Checks if the action on the replica specified by the
ReplicaBalancingAction
is acceptable. |
clusterModelCompletenessRequirements, finish, isHardGoal, partitionActionSelfSatisfied, replicaActionSelfSatisfied
configure, optimize, selfSatisfied, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
actionAcceptance, canChangeReplicationFactor, clusterModelStatsComparator, optimize
public ActionAcceptance replicaActionAcceptance(ReplicaBalancingAction action, ClusterModel clusterModel)
GoalBalancingActionAcceptance
ReplicaBalancingAction
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.action
- Action to be checked for acceptance.clusterModel
- State of the cluster before application of the action.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.action
- Action to be checked for acceptance.clusterModel
- State of the cluster before application of the action.