Search in sources :

Example 6 with RoutingNodes

use of org.opensearch.cluster.routing.RoutingNodes in project OpenSearch by opensearch-project.

the class CancelAllocationCommand method execute.

@Override
public RerouteExplanation execute(RoutingAllocation allocation, boolean explain) {
    DiscoveryNode discoNode = allocation.nodes().resolveNode(node);
    ShardRouting shardRouting = null;
    RoutingNodes routingNodes = allocation.routingNodes();
    RoutingNode routingNode = routingNodes.node(discoNode.getId());
    IndexMetadata indexMetadata = null;
    if (routingNode != null) {
        indexMetadata = allocation.metadata().index(index());
        if (indexMetadata == null) {
            throw new IndexNotFoundException(index());
        }
        ShardId shardId = new ShardId(indexMetadata.getIndex(), shardId());
        shardRouting = routingNode.getByShardId(shardId);
    }
    if (shardRouting == null) {
        if (explain) {
            return new RerouteExplanation(this, allocation.decision(Decision.NO, "cancel_allocation_command", "can't cancel " + shardId + ", failed to find it on node " + discoNode));
        }
        throw new IllegalArgumentException("[cancel_allocation] can't cancel " + shardId + ", failed to find it on node " + discoNode);
    }
    if (shardRouting.primary() && allowPrimary == false) {
        if ((shardRouting.initializing() && shardRouting.relocatingNodeId() != null) == false) {
            // only allow cancelling initializing shard of primary relocation without allowPrimary flag
            if (explain) {
                return new RerouteExplanation(this, allocation.decision(Decision.NO, "cancel_allocation_command", "can't cancel " + shardId + " on node " + discoNode + ", shard is primary and " + shardRouting.state().name().toLowerCase(Locale.ROOT)));
            }
            throw new IllegalArgumentException("[cancel_allocation] can't cancel " + shardId + " on node " + discoNode + ", shard is primary and " + shardRouting.state().name().toLowerCase(Locale.ROOT));
        }
    }
    routingNodes.failShard(LogManager.getLogger(CancelAllocationCommand.class), shardRouting, new UnassignedInfo(UnassignedInfo.Reason.REROUTE_CANCELLED, null), indexMetadata, allocation.changes());
    // TODO: We don't have to remove a cancelled shard from in-sync set once we have a strict resync implementation.
    allocation.removeAllocationId(shardRouting);
    return new RerouteExplanation(this, allocation.decision(Decision.YES, "cancel_allocation_command", "shard " + shardId + " on node " + discoNode + " can be cancelled"));
}
Also used : ShardId(org.opensearch.index.shard.ShardId) DiscoveryNode(org.opensearch.cluster.node.DiscoveryNode) RoutingNode(org.opensearch.cluster.routing.RoutingNode) RoutingNodes(org.opensearch.cluster.routing.RoutingNodes) UnassignedInfo(org.opensearch.cluster.routing.UnassignedInfo) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) RerouteExplanation(org.opensearch.cluster.routing.allocation.RerouteExplanation) ShardRouting(org.opensearch.cluster.routing.ShardRouting) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata)

Example 7 with RoutingNodes

use of org.opensearch.cluster.routing.RoutingNodes in project OpenSearch by opensearch-project.

the class AllocationService method applyStartedShards.

/**
 * Applies the started shards. Note, only initializing ShardRouting instances that exist in the routing table should be
 * provided as parameter and no duplicates should be contained.
 * <p>
 * If the same instance of the {@link ClusterState} is returned, then no change has been made.</p>
 */
public ClusterState applyStartedShards(ClusterState clusterState, List<ShardRouting> startedShards) {
    assert assertInitialized();
    if (startedShards.isEmpty()) {
        return clusterState;
    }
    RoutingNodes routingNodes = getMutableRoutingNodes(clusterState);
    // shuffle the unassigned nodes, just so we won't have things like poison failed shards
    routingNodes.unassigned().shuffle();
    RoutingAllocation allocation = new RoutingAllocation(allocationDeciders, routingNodes, clusterState, clusterInfoService.getClusterInfo(), snapshotsInfoService.snapshotShardSizes(), currentNanoTime());
    // as starting a primary relocation target can reinitialize replica shards, start replicas first
    startedShards = new ArrayList<>(startedShards);
    startedShards.sort(Comparator.comparing(ShardRouting::primary));
    applyStartedShards(allocation, startedShards);
    for (final ExistingShardsAllocator allocator : existingShardsAllocators.values()) {
        allocator.applyStartedShards(startedShards, allocation);
    }
    assert RoutingNodes.assertShardStats(allocation.routingNodes());
    String startedShardsAsString = firstListElementsToCommaDelimitedString(startedShards, s -> s.shardId().toString(), logger.isDebugEnabled());
    return buildResultAndLogHealthChange(clusterState, allocation, "shards started [" + startedShardsAsString + "]");
}
Also used : RoutingNodes(org.opensearch.cluster.routing.RoutingNodes)

Example 8 with RoutingNodes

use of org.opensearch.cluster.routing.RoutingNodes in project OpenSearch by opensearch-project.

the class ClusterRebalanceRoutingTests method testClusterAllActive1.

public void testClusterAllActive1() {
    AllocationService strategy = createAllocationService(Settings.builder().put(ClusterRebalanceAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTING.getKey(), ClusterRebalanceAllocationDecider.ClusterRebalanceType.INDICES_ALL_ACTIVE.toString()).build());
    Metadata metadata = Metadata.builder().put(IndexMetadata.builder("test1").settings(settings(Version.CURRENT)).numberOfShards(1).numberOfReplicas(1)).put(IndexMetadata.builder("test2").settings(settings(Version.CURRENT)).numberOfShards(1).numberOfReplicas(1)).build();
    RoutingTable initialRoutingTable = RoutingTable.builder().addAsNew(metadata.index("test1")).addAsNew(metadata.index("test2")).build();
    ClusterState clusterState = ClusterState.builder(org.opensearch.cluster.ClusterName.CLUSTER_NAME_SETTING.getDefault(Settings.EMPTY)).metadata(metadata).routingTable(initialRoutingTable).build();
    logger.info("start two nodes");
    clusterState = ClusterState.builder(clusterState).nodes(DiscoveryNodes.builder().add(newNode("node1")).add(newNode("node2"))).build();
    clusterState = strategy.reroute(clusterState, "reroute");
    for (int i = 0; i < clusterState.routingTable().index("test1").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test1").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test1").shard(i).primaryShard().state(), equalTo(INITIALIZING));
        assertThat(clusterState.routingTable().index("test1").shard(i).replicaShards().get(0).state(), equalTo(UNASSIGNED));
    }
    for (int i = 0; i < clusterState.routingTable().index("test2").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test2").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test2").shard(i).primaryShard().state(), equalTo(INITIALIZING));
        assertThat(clusterState.routingTable().index("test2").shard(i).replicaShards().get(0).state(), equalTo(UNASSIGNED));
    }
    logger.info("start all the primary shards for test1, replicas will start initializing");
    clusterState = startInitializingShardsAndReroute(strategy, clusterState, "test1");
    for (int i = 0; i < clusterState.routingTable().index("test1").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test1").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test1").shard(i).primaryShard().state(), equalTo(STARTED));
        assertThat(clusterState.routingTable().index("test1").shard(i).replicaShards().get(0).state(), equalTo(INITIALIZING));
    }
    for (int i = 0; i < clusterState.routingTable().index("test2").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test2").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test2").shard(i).primaryShard().state(), equalTo(INITIALIZING));
        assertThat(clusterState.routingTable().index("test2").shard(i).replicaShards().get(0).state(), equalTo(UNASSIGNED));
    }
    logger.info("start the test1 replica shards");
    clusterState = startInitializingShardsAndReroute(strategy, clusterState, "test1");
    for (int i = 0; i < clusterState.routingTable().index("test1").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test1").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test1").shard(i).primaryShard().state(), equalTo(STARTED));
        assertThat(clusterState.routingTable().index("test1").shard(i).replicaShards().get(0).state(), equalTo(STARTED));
    }
    for (int i = 0; i < clusterState.routingTable().index("test2").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test2").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test2").shard(i).primaryShard().state(), equalTo(INITIALIZING));
        assertThat(clusterState.routingTable().index("test2").shard(i).replicaShards().get(0).state(), equalTo(UNASSIGNED));
    }
    logger.info("start all the primary shards for test2, replicas will start initializing");
    clusterState = startInitializingShardsAndReroute(strategy, clusterState, "test2");
    for (int i = 0; i < clusterState.routingTable().index("test1").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test1").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test1").shard(i).primaryShard().state(), equalTo(STARTED));
        assertThat(clusterState.routingTable().index("test1").shard(i).replicaShards().get(0).state(), equalTo(STARTED));
    }
    for (int i = 0; i < clusterState.routingTable().index("test2").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test2").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test2").shard(i).primaryShard().state(), equalTo(STARTED));
        assertThat(clusterState.routingTable().index("test2").shard(i).replicaShards().get(0).state(), equalTo(INITIALIZING));
    }
    logger.info("start the test2 replica shards");
    clusterState = startInitializingShardsAndReroute(strategy, clusterState, "test2");
    for (int i = 0; i < clusterState.routingTable().index("test1").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test1").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test1").shard(i).primaryShard().state(), equalTo(STARTED));
        assertThat(clusterState.routingTable().index("test1").shard(i).replicaShards().get(0).state(), equalTo(STARTED));
    }
    for (int i = 0; i < clusterState.routingTable().index("test2").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test2").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test2").shard(i).primaryShard().state(), equalTo(STARTED));
        assertThat(clusterState.routingTable().index("test2").shard(i).replicaShards().get(0).state(), equalTo(STARTED));
    }
    logger.info("now, start 1 more node, check that rebalancing happen (for test1) because we set it to all_active");
    clusterState = ClusterState.builder(clusterState).nodes(DiscoveryNodes.builder(clusterState.nodes()).add(newNode("node3"))).build();
    clusterState = strategy.reroute(clusterState, "reroute");
    RoutingNodes routingNodes = clusterState.getRoutingNodes();
    assertThat(routingNodes.node("node3").size(), equalTo(1));
    assertThat(routingNodes.node("node3").iterator().next().shardId().getIndex().getName(), anyOf(equalTo("test1"), equalTo("test2")));
}
Also used : ClusterState(org.opensearch.cluster.ClusterState) RoutingTable(org.opensearch.cluster.routing.RoutingTable) RoutingNodes(org.opensearch.cluster.routing.RoutingNodes) Metadata(org.opensearch.cluster.metadata.Metadata) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata)

Example 9 with RoutingNodes

use of org.opensearch.cluster.routing.RoutingNodes in project OpenSearch by opensearch-project.

the class ClusterRebalanceRoutingTests method testClusterAllActive3.

public void testClusterAllActive3() {
    AllocationService strategy = createAllocationService(Settings.builder().put(ClusterRebalanceAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTING.getKey(), ClusterRebalanceAllocationDecider.ClusterRebalanceType.INDICES_ALL_ACTIVE.toString()).build());
    Metadata metadata = Metadata.builder().put(IndexMetadata.builder("test1").settings(settings(Version.CURRENT)).numberOfShards(1).numberOfReplicas(1)).put(IndexMetadata.builder("test2").settings(settings(Version.CURRENT)).numberOfShards(1).numberOfReplicas(1)).build();
    RoutingTable initialRoutingTable = RoutingTable.builder().addAsNew(metadata.index("test1")).addAsNew(metadata.index("test2")).build();
    ClusterState clusterState = ClusterState.builder(org.opensearch.cluster.ClusterName.CLUSTER_NAME_SETTING.getDefault(Settings.EMPTY)).metadata(metadata).routingTable(initialRoutingTable).build();
    logger.info("start two nodes");
    clusterState = ClusterState.builder(clusterState).nodes(DiscoveryNodes.builder().add(newNode("node1")).add(newNode("node2"))).build();
    clusterState = strategy.reroute(clusterState, "reroute");
    for (int i = 0; i < clusterState.routingTable().index("test1").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test1").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test1").shard(i).primaryShard().state(), equalTo(INITIALIZING));
        assertThat(clusterState.routingTable().index("test1").shard(i).replicaShards().get(0).state(), equalTo(UNASSIGNED));
    }
    for (int i = 0; i < clusterState.routingTable().index("test2").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test2").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test2").shard(i).primaryShard().state(), equalTo(INITIALIZING));
        assertThat(clusterState.routingTable().index("test2").shard(i).replicaShards().get(0).state(), equalTo(UNASSIGNED));
    }
    logger.info("start all the primary shards for test1, replicas will start initializing");
    clusterState = startInitializingShardsAndReroute(strategy, clusterState, "test1");
    for (int i = 0; i < clusterState.routingTable().index("test1").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test1").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test1").shard(i).primaryShard().state(), equalTo(STARTED));
        assertThat(clusterState.routingTable().index("test1").shard(i).replicaShards().get(0).state(), equalTo(INITIALIZING));
    }
    for (int i = 0; i < clusterState.routingTable().index("test2").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test2").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test2").shard(i).primaryShard().state(), equalTo(INITIALIZING));
        assertThat(clusterState.routingTable().index("test2").shard(i).replicaShards().get(0).state(), equalTo(UNASSIGNED));
    }
    logger.info("start the test1 replica shards");
    clusterState = startInitializingShardsAndReroute(strategy, clusterState, "test1");
    for (int i = 0; i < clusterState.routingTable().index("test1").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test1").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test1").shard(i).primaryShard().state(), equalTo(STARTED));
        assertThat(clusterState.routingTable().index("test1").shard(i).replicaShards().get(0).state(), equalTo(STARTED));
    }
    for (int i = 0; i < clusterState.routingTable().index("test2").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test2").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test2").shard(i).primaryShard().state(), equalTo(INITIALIZING));
        assertThat(clusterState.routingTable().index("test2").shard(i).replicaShards().get(0).state(), equalTo(UNASSIGNED));
    }
    logger.info("start all the primary shards for test2, replicas will start initializing");
    clusterState = startInitializingShardsAndReroute(strategy, clusterState, "test2");
    for (int i = 0; i < clusterState.routingTable().index("test1").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test1").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test1").shard(i).primaryShard().state(), equalTo(STARTED));
        assertThat(clusterState.routingTable().index("test1").shard(i).replicaShards().get(0).state(), equalTo(STARTED));
    }
    for (int i = 0; i < clusterState.routingTable().index("test2").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test2").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test2").shard(i).primaryShard().state(), equalTo(STARTED));
        assertThat(clusterState.routingTable().index("test2").shard(i).replicaShards().get(0).state(), equalTo(INITIALIZING));
    }
    logger.info("now, start 1 more node, check that rebalancing will not happen (for test1) because we set it to all_active");
    clusterState = ClusterState.builder(clusterState).nodes(DiscoveryNodes.builder(clusterState.nodes()).add(newNode("node3"))).build();
    clusterState = strategy.reroute(clusterState, "reroute");
    RoutingNodes routingNodes = clusterState.getRoutingNodes();
    assertThat(routingNodes.node("node3").isEmpty(), equalTo(true));
}
Also used : ClusterState(org.opensearch.cluster.ClusterState) RoutingTable(org.opensearch.cluster.routing.RoutingTable) RoutingNodes(org.opensearch.cluster.routing.RoutingNodes) Metadata(org.opensearch.cluster.metadata.Metadata) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata)

Example 10 with RoutingNodes

use of org.opensearch.cluster.routing.RoutingNodes in project OpenSearch by opensearch-project.

the class ClusterRebalanceRoutingTests method testClusterAllActive2.

public void testClusterAllActive2() {
    AllocationService strategy = createAllocationService(Settings.builder().put(ClusterRebalanceAllocationDecider.CLUSTER_ROUTING_ALLOCATION_ALLOW_REBALANCE_SETTING.getKey(), ClusterRebalanceAllocationDecider.ClusterRebalanceType.INDICES_ALL_ACTIVE.toString()).build());
    Metadata metadata = Metadata.builder().put(IndexMetadata.builder("test1").settings(settings(Version.CURRENT)).numberOfShards(1).numberOfReplicas(1)).put(IndexMetadata.builder("test2").settings(settings(Version.CURRENT)).numberOfShards(1).numberOfReplicas(1)).build();
    RoutingTable initialRoutingTable = RoutingTable.builder().addAsNew(metadata.index("test1")).addAsNew(metadata.index("test2")).build();
    ClusterState clusterState = ClusterState.builder(org.opensearch.cluster.ClusterName.CLUSTER_NAME_SETTING.getDefault(Settings.EMPTY)).metadata(metadata).routingTable(initialRoutingTable).build();
    logger.info("start two nodes");
    clusterState = ClusterState.builder(clusterState).nodes(DiscoveryNodes.builder().add(newNode("node1")).add(newNode("node2"))).build();
    clusterState = strategy.reroute(clusterState, "reroute");
    for (int i = 0; i < clusterState.routingTable().index("test1").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test1").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test1").shard(i).primaryShard().state(), equalTo(INITIALIZING));
        assertThat(clusterState.routingTable().index("test1").shard(i).replicaShards().get(0).state(), equalTo(UNASSIGNED));
    }
    for (int i = 0; i < clusterState.routingTable().index("test2").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test2").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test2").shard(i).primaryShard().state(), equalTo(INITIALIZING));
        assertThat(clusterState.routingTable().index("test2").shard(i).replicaShards().get(0).state(), equalTo(UNASSIGNED));
    }
    logger.info("start all the primary shards for test1, replicas will start initializing");
    clusterState = startInitializingShardsAndReroute(strategy, clusterState, "test1");
    for (int i = 0; i < clusterState.routingTable().index("test1").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test1").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test1").shard(i).primaryShard().state(), equalTo(STARTED));
        assertThat(clusterState.routingTable().index("test1").shard(i).replicaShards().get(0).state(), equalTo(INITIALIZING));
    }
    for (int i = 0; i < clusterState.routingTable().index("test2").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test2").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test2").shard(i).primaryShard().state(), equalTo(INITIALIZING));
        assertThat(clusterState.routingTable().index("test2").shard(i).replicaShards().get(0).state(), equalTo(UNASSIGNED));
    }
    logger.info("start the test1 replica shards");
    clusterState = startInitializingShardsAndReroute(strategy, clusterState, "test1");
    for (int i = 0; i < clusterState.routingTable().index("test1").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test1").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test1").shard(i).primaryShard().state(), equalTo(STARTED));
        assertThat(clusterState.routingTable().index("test1").shard(i).replicaShards().get(0).state(), equalTo(STARTED));
    }
    for (int i = 0; i < clusterState.routingTable().index("test2").shards().size(); i++) {
        assertThat(clusterState.routingTable().index("test2").shard(i).shards().size(), equalTo(2));
        assertThat(clusterState.routingTable().index("test2").shard(i).primaryShard().state(), equalTo(INITIALIZING));
        assertThat(clusterState.routingTable().index("test2").shard(i).replicaShards().get(0).state(), equalTo(UNASSIGNED));
    }
    logger.info("now, start 1 more node, check that rebalancing will not happen (for test1) because we set it to all_active");
    clusterState = ClusterState.builder(clusterState).nodes(DiscoveryNodes.builder(clusterState.nodes()).add(newNode("node3"))).build();
    clusterState = strategy.reroute(clusterState, "reroute");
    RoutingNodes routingNodes = clusterState.getRoutingNodes();
    assertThat(routingNodes.node("node3").isEmpty(), equalTo(true));
}
Also used : ClusterState(org.opensearch.cluster.ClusterState) RoutingTable(org.opensearch.cluster.routing.RoutingTable) RoutingNodes(org.opensearch.cluster.routing.RoutingNodes) Metadata(org.opensearch.cluster.metadata.Metadata) IndexMetadata(org.opensearch.cluster.metadata.IndexMetadata)

Aggregations

RoutingNodes (org.opensearch.cluster.routing.RoutingNodes)63 ClusterState (org.opensearch.cluster.ClusterState)48 IndexMetadata (org.opensearch.cluster.metadata.IndexMetadata)45 Metadata (org.opensearch.cluster.metadata.Metadata)42 RoutingTable (org.opensearch.cluster.routing.RoutingTable)42 ShardRouting (org.opensearch.cluster.routing.ShardRouting)24 RoutingNode (org.opensearch.cluster.routing.RoutingNode)17 DiscoveryNode (org.opensearch.cluster.node.DiscoveryNode)13 IndexShardRoutingTable (org.opensearch.cluster.routing.IndexShardRoutingTable)11 DiscoveryNodes (org.opensearch.cluster.node.DiscoveryNodes)9 RoutingAllocation (org.opensearch.cluster.routing.allocation.RoutingAllocation)8 Settings (org.opensearch.common.settings.Settings)8 IndexRoutingTable (org.opensearch.cluster.routing.IndexRoutingTable)7 TestShardRouting (org.opensearch.cluster.routing.TestShardRouting)7 UnassignedInfo (org.opensearch.cluster.routing.UnassignedInfo)7 ClusterSettings (org.opensearch.common.settings.ClusterSettings)7 ClusterInfo (org.opensearch.cluster.ClusterInfo)6 ArrayList (java.util.ArrayList)5 BalancedShardsAllocator (org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator)5 ImmutableOpenMap (org.opensearch.common.collect.ImmutableOpenMap)5