server/src/main/java/org/elasticsearch/health/node/DiskHealthIndicatorService.java
}
        private static HealthIndicatorDetails createDetails(Map<String, DiskHealthInfo> diskHealthInfoMap, Set<String> blockedIndices) {
            Map<HealthStatus, Integer> healthNodesCount = new HashMap<>();
            for (HealthStatus healthStatus : HealthStatus.values()) {
                healthNodesCount.put(healthStatus, 0);
            }
            for (DiskHealthInfo diskHealthInfo : diskHealthInfoMap.values()) {
                healthNodesCount.computeIfPresent(diskHealthInfo.healthStatus(), (key, oldCount) -> oldCount + 1);
            }
            return ((builder, params) -> {
                builder.startObject();
                builder.field("blocked_indices", blockedIndices.size());
                for (HealthStatus healthStatus : HealthStatus.values()) {
                    builder.field(healthStatus.name().toLowerCase(Locale.ROOT) + "_nodes", healthNodesCount.get(healthStatus));
                }
                return builder.endObject();
            });
        }
        private boolean hasUnhealthyDataNodes() {
            return dataNodes.isEmpty() == false;
        }
        private boolean hasUnhealthyMasterNodes() {
            return masterNodes.isEmpty() == false;
        }
        private boolean hasUnhealthyOtherNodes() {
            return otherNodes.isEmpty() == false;
        }
        private boolean hasBlockedIndices() {
            return blockedIndices.isEmpty() == false;
        }