private HostStatus createHostStatusFromResponse(String hostname, Request request) {
        if (request.isError()) {
            return new HostStatus(hostname,
                                  Status.UNKNOWN,
                                  Map.of(),
                                  "error: " + request.errorMessage() + "(" + request.errorCode() + ")");
        } else {
            Map<String, Double> fileReferenceStatuses = new HashMap<>();
            String[] fileReferences = request.returnValues().get(0).asStringArray();
            double[] downloadStatus = request.returnValues().get(1).asDoubleArray();

            boolean allDownloaded = true;
            for (int i = 0; i < fileReferences.length; i++) {
                fileReferenceStatuses.put(fileReferences[i], downloadStatus[i]);
                if (downloadStatus[i] < 1.0) {
                    allDownloaded = false;
                }
            }

            return new HostStatus(hostname, allDownloaded ? Status.FINISHED : Status.IN_PROGRESS, fileReferenceStatuses, "");
        }
    }
File distribution status for each host in the application

@author hmusum
configserver/src/main/java/com/yahoo/vespa/config/server/application/FileDistributionStatus.java