public Map<String, String> getViewBuildStatuses(String keyspace, String view) { Map<UUID, String> coreViewStatus = SystemDistributedKeyspace.viewStatus(keyspace, view); Map<InetAddress, UUID> hostIdToEndpoint = tokenMetadata.getEndpointToHostIdMapForReading(); Map<String, String> result = new HashMap<>(); for (Map.Entry<InetAddress, UUID> entry : hostIdToEndpoint.entrySet()) { UUID hostId = entry.getValue(); InetAddress endpoint = entry.getKey(); result.put(endpoint.toString(), coreViewStatus.containsKey(hostId) ? coreViewStatus.get(hostId) : "UNKNOWN"); } return Collections.unmodifiableMap(result); }
public Map<String, String> getViewBuildStatuses(String keyspace, String view) { Map<UUID, String> coreViewStatus = SystemDistributedKeyspace.viewStatus(keyspace, view); Map<InetAddress, UUID> hostIdToEndpoint = tokenMetadata.getEndpointToHostIdMapForReading(); Map<String, String> result = new HashMap<>(); for (Map.Entry<InetAddress, UUID> entry : hostIdToEndpoint.entrySet()) { UUID hostId = entry.getValue(); InetAddress endpoint = entry.getKey(); result.put(endpoint.toString(), coreViewStatus.containsKey(hostId) ? coreViewStatus.get(hostId) : "UNKNOWN"); } return Collections.unmodifiableMap(result); }
public Map<String, String> getViewBuildStatuses(String keyspace, String view) { Map<UUID, String> coreViewStatus = SystemDistributedKeyspace.viewStatus(keyspace, view); Map<InetAddress, UUID> hostIdToEndpoint = tokenMetadata.getEndpointToHostIdMapForReading(); Map<String, String> result = new HashMap<>(); for (Map.Entry<InetAddress, UUID> entry : hostIdToEndpoint.entrySet()) { UUID hostId = entry.getValue(); InetAddress endpoint = entry.getKey(); result.put(endpoint.toString(), coreViewStatus.containsKey(hostId) ? coreViewStatus.get(hostId) : "UNKNOWN"); } return Collections.unmodifiableMap(result); }