private CompletableFuture<Map<String, ClusterReindexing>> getReindexingStatus(ServiceInfo service) {
        URI uri = URI.create(String.format("http://%s:%d/reindexing/v1/status", service.getHostName(), getStatePort(service)));
        CompletableFuture<SimpleHttpResponse> responsePromise = new CompletableFuture<>();
        httpClient.execute(SimpleRequestBuilder.get(uri).build(), new FutureCallback<>() {
            @Override public void completed(SimpleHttpResponse result) { responsePromise.complete(result); }
            @Override public void failed(Exception ex) { responsePromise.completeExceptionally(ex); }
            @Override public void cancelled() { responsePromise.cancel(false); }
        });
        return responsePromise.handleAsync((response, error) ->  {
            if (response != null) {
                return uncheck(() -> toClusterReindexing(response));
            } else {
                throw throwUnchecked(new IOException(String.format("For '%s': %s", uri, error.getMessage()), error));
            }
        }, executor);
    }
Retrieves reindexing status from cluster controllers over HTTP

@author bjorncs
configserver/src/main/java/com/yahoo/vespa/config/server/application/DefaultClusterReindexingStatusClient.java