HttpResponse getStatus() {
        Slime slime = new Slime();
        Cursor clustersObject = slime.setObject().setObject("clusters");
        for (String clusterName : clusterNames) {
            Cursor documentTypesObject = clustersObject.setObject(clusterName).setObject("documentTypes");
            database.readReindexing(clusterName).status().forEach((type, status) -> {
                Cursor statusObject = documentTypesObject.setObject(type.getName());
                statusObject.setLong("startedMillis", status.startedAt().toEpochMilli());
                status.endedAt().ifPresent(endedAt -> statusObject.setLong("endedMillis", endedAt.toEpochMilli()));
                status.progress().ifPresent(progress -> statusObject.setDouble("progress", progress.percentFinished() * 1e-2));
                statusObject.setString("state", toString(status.state()));
                status.message().ifPresent(message -> statusObject.setString("message", message));
            });
        }
        return new SlimeJsonResponse(slime);
    }
Allows inspecting reindexing status over HTTP.

@author jonmv
clustercontroller-reindexer/src/main/java/ai/vespa/reindexing/http/ReindexingV1ApiHandler.java