boolean validateAction(int srcBrokerId, int destBrokerId, TopicPartition tp, ClusterModelSnapshot cluster) {
        BrokerUpdater.Broker destBroker = cluster.broker(destBrokerId);
        BrokerUpdater.Broker srcBroker = cluster.broker(srcBrokerId);
        TopicPartitionReplicaUpdater.TopicPartitionReplica replica = cluster.replica(srcBrokerId, tp);
        AbstractInstanceUpdater.Load replicaLoad = replica.load(resource());
        if (!replicaLoad.isTrusted()) {
            return false;
        }
        if (replicaLoad.getValue() == 0) {
            return true;
        }
        return destBroker.load(resource()).isTrusted() && srcBroker.load(resource()).isTrusted();
    }
Try to increase resource load by move or swap replicas in.

@param actionType       type of action
@param cluster          cluster model
@param srcBroker        broker to increase load
@param candidateBrokers candidate brokers to move replicas from, or swap replicas with
@param goalsByPriority  all configured goals sorted by priority
@return a list of actions able to increase load of srcBroker along with load change
core/src/main/java/kafka/autobalancer/goals/AbstractResourceGoal.java