@Override
    public RemoveRaftVoterResult removeRaftVoter(
        int voterId,
        Uuid voterDirectoryId,
        RemoveRaftVoterOptions options
    ) {
        NodeProvider provider = new LeastLoadedBrokerOrActiveKController();

        final KafkaFutureImpl<Void> future = new KafkaFutureImpl<>();
        final long now = time.milliseconds();
        final Call call = new Call(
                "removeRaftVoter", calcDeadlineMs(now, options.timeoutMs()), provider) {

            @Override
            RemoveRaftVoterRequest.Builder createRequest(int timeoutMs) {
                return new RemoveRaftVoterRequest.Builder(
                    new RemoveRaftVoterRequestData().
                        setVoterId(voterId) .
                        setVoterDirectoryId(voterDirectoryId));
            }

            @Override
            void handleResponse(AbstractResponse response) {
                AddRaftVoterResponse addResponse = (AddRaftVoterResponse) response;
                if (addResponse.data().errorCode() != Errors.NONE.code()) {
                    ApiError error = new ApiError(
                            addResponse.data().errorCode(),
                            addResponse.data().errorMessage());
                    future.completeExceptionally(error.exception());
                } else {
                    future.complete(null);
                }
            }

            @Override
            void handleFailure(Throwable throwable) {
                future.completeExceptionally(throwable);
            }
        };
        runnable.call(call, now);
        return new RemoveRaftVoterResult(future);
    }
Returns the broker id pertaining to the given resource, or null if the resource is not associated
with a particular broker.
clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java