/** * Finds all indices that have not all primaries available */ private Set<String> indicesWithMissingPrimaries(ClusterState clusterState, String[] concreteIndices) { Set<String> indices = new HashSet<>(); RoutingTable routingTable = clusterState.routingTable(); for (String index : concreteIndices) { IndexRoutingTable indexRoutingTable = routingTable.index(index); if (indexRoutingTable.allPrimaryShardsActive() == false) { indices.add(index); } } return indices; }
if (indexRoutingTable.allPrimaryShardsActive() == false) {
/** * Finds all indices that have not all primaries available */ private Set<String> indicesWithMissingPrimaries(ClusterState clusterState, String[] concreteIndices) { Set<String> indices = new HashSet<>(); RoutingTable routingTable = clusterState.routingTable(); for (String index : concreteIndices) { IndexRoutingTable indexRoutingTable = routingTable.index(index); if (indexRoutingTable.allPrimaryShardsActive() == false) { indices.add(index); } } return indices; }
/** * Finds all indices that have not all primaries available */ private Set<String> indicesWithMissingPrimaries(ClusterState clusterState, String[] concreteIndices) { Set<String> indices = new HashSet<>(); RoutingTable routingTable = clusterState.routingTable(); for (String index : concreteIndices) { IndexRoutingTable indexRoutingTable = routingTable.index(index); if (indexRoutingTable.allPrimaryShardsActive() == false) { indices.add(index); } } return indices; }
/** * Finds all indices that have not all primaries available */ private Set<String> indicesWithMissingPrimaries(ClusterState clusterState, String[] concreteIndices) { Set<String> indices = new HashSet<>(); RoutingTable routingTable = clusterState.routingTable(); for (String index : concreteIndices) { IndexRoutingTable indexRoutingTable = routingTable.index(index); if (indexRoutingTable.allPrimaryShardsActive() == false) { indices.add(index); } } return indices; }
public boolean isLocalShardsStarted(String index) { return index(index) != null && index(index).allPrimaryShardsActive(); }
/** * Finds all indices that have not all primaries available */ private Set<String> indicesWithMissingPrimaries(ClusterState clusterState, String[] concreteIndices) { Set<String> indices = newHashSet(); RoutingTable routingTable = clusterState.routingTable(); for (String index : concreteIndices) { IndexRoutingTable indexRoutingTable = routingTable.index(index); if (indexRoutingTable.allPrimaryShardsActive() == false) { indices.add(index); } } return indices; }
if (indexRoutingTable.allPrimaryShardsActive() == false) {
if (indexRoutingTable.allPrimaryShardsActive() == false) {
if (indexRoutingTable.allPrimaryShardsActive() == false) {