public PartitionChangeBuilder setTargetNode(int brokerId) {
        setTargetIsr(Collections.singletonList(brokerId));
        setTargetReplicas(Collections.singletonList(brokerId));
        setTargetLeaderRecoveryState(LeaderRecoveryState.RECOVERED);
        return this;
    }
Prefer replicas in the ISR but keep the partition online even if it requires picking a leader that is not in the ISR.
metadata/src/main/java/org/apache/kafka/controller/PartitionChangeBuilder.java