server/src/main/java/org/elasticsearch/health/node/DiskHealthIndicatorService.java
private final List<DiscoveryNode> dataNodes = new ArrayList<>();
        
        private final Map<HealthStatus, List<DiscoveryNode>> masterNodes = new HashMap<>();
        
        private final Map<HealthStatus, List<DiscoveryNode>> otherNodes = new HashMap<>();
        private final Set<DiscoveryNodeRole> affectedRoles = new HashSet<>();
        private final Set<String> indicesAtRisk;
        private final HealthStatus healthStatus;
        private final HealthIndicatorDetails details;
        DiskHealthAnalyzer(Map<String, DiskHealthInfo> diskHealthByNode, ClusterState clusterState) {
            this.clusterState = clusterState;
            blockedIndices = clusterState.blocks()
                .indices()
                .entrySet()
                .stream()
                .filter(entry -> entry.getValue().contains(IndexMetadata.INDEX_READ_ONLY_ALLOW_DELETE_BLOCK))
                .map(Map.Entry::getKey)
                .collect(Collectors.toSet());
            HealthStatus mostSevereStatusSoFar = blockedIndices.isEmpty() ? HealthStatus.GREEN : HealthStatus.RED;
            for (String nodeId : diskHealthByNode.keySet()) {
                DiscoveryNode node = clusterState.getNodes().get(nodeId);
                HealthStatus healthStatus = diskHealthByNode.get(nodeId).healthStatus();
                
                if (mostSevereStatusSoFar.value() < healthStatus.value()) {
                    mostSevereStatusSoFar = healthStatus;
                }
                if (node == null || healthStatus.indicatesHealthProblem() == false) {
                    continue;
                }
                affectedRoles.addAll(node.getRoles());