Search in sources :

Example 1 with FilterAllocationDecider

use of org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider in project elasticsearch by elastic.

the class ClusterModule method createAllocationDeciders.

// TODO: this is public so allocation benchmark can access the default deciders...can we do that in another way?
/** Return a new {@link AllocationDecider} instance with builtin deciders as well as those from plugins. */
public static Collection<AllocationDecider> createAllocationDeciders(Settings settings, ClusterSettings clusterSettings, List<ClusterPlugin> clusterPlugins) {
    // collect deciders by class so that we can detect duplicates
    Map<Class, AllocationDecider> deciders = new LinkedHashMap<>();
    addAllocationDecider(deciders, new MaxRetryAllocationDecider(settings));
    addAllocationDecider(deciders, new ReplicaAfterPrimaryActiveAllocationDecider(settings));
    addAllocationDecider(deciders, new RebalanceOnlyWhenActiveAllocationDecider(settings));
    addAllocationDecider(deciders, new ClusterRebalanceAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new ConcurrentRebalanceAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new EnableAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new NodeVersionAllocationDecider(settings));
    addAllocationDecider(deciders, new SnapshotInProgressAllocationDecider(settings));
    addAllocationDecider(deciders, new FilterAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new SameShardAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new DiskThresholdDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new ThrottlingAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new ShardsLimitAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new AwarenessAllocationDecider(settings, clusterSettings));
    clusterPlugins.stream().flatMap(p -> p.createAllocationDeciders(settings, clusterSettings).stream()).forEach(d -> addAllocationDecider(deciders, d));
    return deciders.values();
}
Also used : MetaData(org.elasticsearch.cluster.metadata.MetaData) DelayedAllocationService(org.elasticsearch.cluster.routing.DelayedAllocationService) IngestMetadata(org.elasticsearch.ingest.IngestMetadata) AwarenessAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.AwarenessAllocationDecider) Property(org.elasticsearch.common.settings.Setting.Property) SameShardAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SameShardAllocationDecider) AllocationService(org.elasticsearch.cluster.routing.allocation.AllocationService) Reader(org.elasticsearch.common.io.stream.Writeable.Reader) ConcurrentRebalanceAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ConcurrentRebalanceAllocationDecider) ClusterPlugin(org.elasticsearch.plugins.ClusterPlugin) Settings(org.elasticsearch.common.settings.Settings) SnapshotInProgressAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SnapshotInProgressAllocationDecider) Map(java.util.Map) TaskResultsService(org.elasticsearch.tasks.TaskResultsService) ParseField(org.elasticsearch.common.ParseField) NamedXContentRegistry(org.elasticsearch.common.xcontent.NamedXContentRegistry) ShardsLimitAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider) MappingUpdatedAction(org.elasticsearch.cluster.action.index.MappingUpdatedAction) BalancedShardsAllocator(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator) Setting(org.elasticsearch.common.settings.Setting) AbstractModule(org.elasticsearch.common.inject.AbstractModule) DiskThresholdDecider(org.elasticsearch.cluster.routing.allocation.decider.DiskThresholdDecider) Collection(java.util.Collection) NodeMappingRefreshAction(org.elasticsearch.cluster.action.index.NodeMappingRefreshAction) Objects(java.util.Objects) RebalanceOnlyWhenActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.RebalanceOnlyWhenActiveAllocationDecider) List(java.util.List) ShardStateAction(org.elasticsearch.cluster.action.shard.ShardStateAction) AllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider) NodeVersionAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.NodeVersionAllocationDecider) FilterAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider) ThrottlingAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider) MetaDataCreateIndexService(org.elasticsearch.cluster.metadata.MetaDataCreateIndexService) ReplicaAfterPrimaryActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ReplicaAfterPrimaryActiveAllocationDecider) MaxRetryAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider) ClusterService(org.elasticsearch.cluster.service.ClusterService) NamedWriteable(org.elasticsearch.common.io.stream.NamedWriteable) IndexGraveyard(org.elasticsearch.cluster.metadata.IndexGraveyard) HashMap(java.util.HashMap) Function(java.util.function.Function) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) MetaDataUpdateSettingsService(org.elasticsearch.cluster.metadata.MetaDataUpdateSettingsService) NamedWriteableRegistry(org.elasticsearch.common.io.stream.NamedWriteableRegistry) AllocationDeciders(org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders) ClusterRebalanceAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider) EnableAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider) RepositoriesMetaData(org.elasticsearch.cluster.metadata.RepositoriesMetaData) MetaDataIndexAliasesService(org.elasticsearch.cluster.metadata.MetaDataIndexAliasesService) ShardsAllocator(org.elasticsearch.cluster.routing.allocation.allocator.ShardsAllocator) ClusterSettings(org.elasticsearch.common.settings.ClusterSettings) MetaDataIndexTemplateService(org.elasticsearch.cluster.metadata.MetaDataIndexTemplateService) ScriptMetaData(org.elasticsearch.script.ScriptMetaData) MetaDataMappingService(org.elasticsearch.cluster.metadata.MetaDataMappingService) RoutingService(org.elasticsearch.cluster.routing.RoutingService) MetaDataDeleteIndexService(org.elasticsearch.cluster.metadata.MetaDataDeleteIndexService) IndexNameExpressionResolver(org.elasticsearch.cluster.metadata.IndexNameExpressionResolver) Writeable(org.elasticsearch.common.io.stream.Writeable) GatewayAllocator(org.elasticsearch.gateway.GatewayAllocator) MetaDataIndexStateService(org.elasticsearch.cluster.metadata.MetaDataIndexStateService) Entry(org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry) SnapshotInProgressAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SnapshotInProgressAllocationDecider) EnableAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider) RebalanceOnlyWhenActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.RebalanceOnlyWhenActiveAllocationDecider) ThrottlingAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider) MaxRetryAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider) ReplicaAfterPrimaryActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ReplicaAfterPrimaryActiveAllocationDecider) LinkedHashMap(java.util.LinkedHashMap) ClusterRebalanceAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider) SameShardAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SameShardAllocationDecider) FilterAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider) DiskThresholdDecider(org.elasticsearch.cluster.routing.allocation.decider.DiskThresholdDecider) ShardsLimitAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider) AwarenessAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.AwarenessAllocationDecider) NodeVersionAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.NodeVersionAllocationDecider) AwarenessAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.AwarenessAllocationDecider) SameShardAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SameShardAllocationDecider) ConcurrentRebalanceAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ConcurrentRebalanceAllocationDecider) SnapshotInProgressAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SnapshotInProgressAllocationDecider) ShardsLimitAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider) RebalanceOnlyWhenActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.RebalanceOnlyWhenActiveAllocationDecider) AllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider) NodeVersionAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.NodeVersionAllocationDecider) FilterAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider) ThrottlingAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider) ReplicaAfterPrimaryActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ReplicaAfterPrimaryActiveAllocationDecider) MaxRetryAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider) ClusterRebalanceAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider) EnableAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider) ConcurrentRebalanceAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ConcurrentRebalanceAllocationDecider)

Example 2 with FilterAllocationDecider

use of org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider in project elasticsearch by elastic.

the class FilterAllocationDeciderTests method testFilterInitialRecovery.

public void testFilterInitialRecovery() {
    ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS);
    FilterAllocationDecider filterAllocationDecider = new FilterAllocationDecider(Settings.EMPTY, clusterSettings);
    AllocationDeciders allocationDeciders = new AllocationDeciders(Settings.EMPTY, Arrays.asList(filterAllocationDecider, new SameShardAllocationDecider(Settings.EMPTY, clusterSettings), new ReplicaAfterPrimaryActiveAllocationDecider(Settings.EMPTY)));
    AllocationService service = new AllocationService(Settings.builder().build(), allocationDeciders, new TestGatewayAllocator(), new BalancedShardsAllocator(Settings.EMPTY), EmptyClusterInfoService.INSTANCE);
    ClusterState state = createInitialClusterState(service, Settings.builder().put("index.routing.allocation.initial_recovery._id", "node2").build());
    RoutingTable routingTable = state.routingTable();
    // we can initally only allocate on node2
    assertEquals(routingTable.index("idx").shard(0).shards().get(0).state(), INITIALIZING);
    assertEquals(routingTable.index("idx").shard(0).shards().get(0).currentNodeId(), "node2");
    routingTable = service.applyFailedShard(state, routingTable.index("idx").shard(0).shards().get(0)).routingTable();
    state = ClusterState.builder(state).routingTable(routingTable).build();
    assertEquals(routingTable.index("idx").shard(0).shards().get(0).state(), UNASSIGNED);
    assertNull(routingTable.index("idx").shard(0).shards().get(0).currentNodeId());
    // after failing the shard we are unassigned since the node is blacklisted and we can't initialize on the other node
    RoutingAllocation allocation = new RoutingAllocation(allocationDeciders, state.getRoutingNodes(), state, null, 0, false);
    allocation.debugDecision(true);
    Decision.Single decision = (Decision.Single) filterAllocationDecider.canAllocate(routingTable.index("idx").shard(0).primaryShard(), state.getRoutingNodes().node("node2"), allocation);
    assertEquals(Type.YES, decision.type());
    assertEquals("node passes include/exclude/require filters", decision.getExplanation());
    ShardRouting primaryShard = routingTable.index("idx").shard(0).primaryShard();
    decision = (Decision.Single) filterAllocationDecider.canAllocate(routingTable.index("idx").shard(0).primaryShard(), state.getRoutingNodes().node("node1"), allocation);
    assertEquals(Type.NO, decision.type());
    if (primaryShard.recoverySource().getType() == RecoverySource.Type.LOCAL_SHARDS) {
        assertEquals("initial allocation of the shrunken index is only allowed on nodes [_id:\"node2\"] that " + "hold a copy of every shard in the index", decision.getExplanation());
    } else {
        assertEquals("initial allocation of the index is only allowed on nodes [_id:\"node2\"]", decision.getExplanation());
    }
    state = service.reroute(state, "try allocate again");
    routingTable = state.routingTable();
    assertEquals(routingTable.index("idx").shard(0).primaryShard().state(), INITIALIZING);
    assertEquals(routingTable.index("idx").shard(0).primaryShard().currentNodeId(), "node2");
    state = service.applyStartedShards(state, routingTable.index("idx").shard(0).shardsWithState(INITIALIZING));
    routingTable = state.routingTable();
    // ok now we are started and can be allocated anywhere!! lets see...
    // first create another copy
    assertEquals(routingTable.index("idx").shard(0).replicaShards().get(0).state(), INITIALIZING);
    assertEquals(routingTable.index("idx").shard(0).replicaShards().get(0).currentNodeId(), "node1");
    state = service.applyStartedShards(state, routingTable.index("idx").shard(0).replicaShardsWithState(INITIALIZING));
    routingTable = state.routingTable();
    assertEquals(routingTable.index("idx").shard(0).replicaShards().get(0).state(), STARTED);
    assertEquals(routingTable.index("idx").shard(0).replicaShards().get(0).currentNodeId(), "node1");
    // now remove the node of the other copy and fail the current
    DiscoveryNode node1 = state.nodes().resolveNode("node1");
    state = service.deassociateDeadNodes(ClusterState.builder(state).nodes(DiscoveryNodes.builder(state.nodes()).remove("node1")).build(), true, "test");
    state = service.applyFailedShard(state, routingTable.index("idx").shard(0).primaryShard());
    // now bring back node1 and see it's assigned
    state = service.reroute(ClusterState.builder(state).nodes(DiscoveryNodes.builder(state.nodes()).add(node1)).build(), "test");
    routingTable = state.routingTable();
    assertEquals(routingTable.index("idx").shard(0).primaryShard().state(), INITIALIZING);
    assertEquals(routingTable.index("idx").shard(0).primaryShard().currentNodeId(), "node1");
    allocation = new RoutingAllocation(allocationDeciders, state.getRoutingNodes(), state, null, 0, false);
    allocation.debugDecision(true);
    decision = (Decision.Single) filterAllocationDecider.canAllocate(routingTable.index("idx").shard(0).shards().get(0), state.getRoutingNodes().node("node2"), allocation);
    assertEquals(Type.YES, decision.type());
    assertEquals("node passes include/exclude/require filters", decision.getExplanation());
    decision = (Decision.Single) filterAllocationDecider.canAllocate(routingTable.index("idx").shard(0).shards().get(0), state.getRoutingNodes().node("node1"), allocation);
    assertEquals(Type.YES, decision.type());
    assertEquals("node passes include/exclude/require filters", decision.getExplanation());
}
Also used : TestGatewayAllocator(org.elasticsearch.test.gateway.TestGatewayAllocator) ClusterState(org.elasticsearch.cluster.ClusterState) DiscoveryNode(org.elasticsearch.cluster.node.DiscoveryNode) ClusterSettings(org.elasticsearch.common.settings.ClusterSettings) BalancedShardsAllocator(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator) AllocationDeciders(org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders) ReplicaAfterPrimaryActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ReplicaAfterPrimaryActiveAllocationDecider) Decision(org.elasticsearch.cluster.routing.allocation.decider.Decision) SameShardAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SameShardAllocationDecider) RoutingTable(org.elasticsearch.cluster.routing.RoutingTable) FilterAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider) ShardRouting(org.elasticsearch.cluster.routing.ShardRouting)

Example 3 with FilterAllocationDecider

use of org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider in project crate by crate.

the class ClusterModule method createAllocationDeciders.

// TODO: this is public so allocation benchmark can access the default deciders...can we do that in another way?
/**
 * Return a new {@link AllocationDecider} instance with builtin deciders as well as those from plugins.
 */
public static Collection<AllocationDecider> createAllocationDeciders(Settings settings, ClusterSettings clusterSettings, List<ClusterPlugin> clusterPlugins) {
    // collect deciders by class so that we can detect duplicates
    Map<Class, AllocationDecider> deciders = new LinkedHashMap<>();
    addAllocationDecider(deciders, new MaxRetryAllocationDecider());
    addAllocationDecider(deciders, new ResizeAllocationDecider());
    addAllocationDecider(deciders, new ReplicaAfterPrimaryActiveAllocationDecider());
    addAllocationDecider(deciders, new RebalanceOnlyWhenActiveAllocationDecider());
    addAllocationDecider(deciders, new ClusterRebalanceAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new ConcurrentRebalanceAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new EnableAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new NodeVersionAllocationDecider());
    addAllocationDecider(deciders, new SnapshotInProgressAllocationDecider());
    addAllocationDecider(deciders, new RestoreInProgressAllocationDecider());
    addAllocationDecider(deciders, new FilterAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new SameShardAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new DiskThresholdDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new ThrottlingAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new ShardsLimitAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new AwarenessAllocationDecider(settings, clusterSettings));
    addAllocationDecider(deciders, new DecommissionAllocationDecider(settings, clusterSettings));
    clusterPlugins.stream().flatMap(p -> p.createAllocationDeciders(settings, clusterSettings).stream()).forEach(d -> addAllocationDecider(deciders, d));
    return deciders.values();
}
Also used : DelayedAllocationService(org.elasticsearch.cluster.routing.DelayedAllocationService) MetadataIndexTemplateService(org.elasticsearch.cluster.metadata.MetadataIndexTemplateService) AwarenessAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.AwarenessAllocationDecider) Property(org.elasticsearch.common.settings.Setting.Property) ResizeAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ResizeAllocationDecider) SameShardAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SameShardAllocationDecider) AllocationService(org.elasticsearch.cluster.routing.allocation.AllocationService) Reader(org.elasticsearch.common.io.stream.Writeable.Reader) ConcurrentRebalanceAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ConcurrentRebalanceAllocationDecider) ClusterPlugin(org.elasticsearch.plugins.ClusterPlugin) Settings(org.elasticsearch.common.settings.Settings) Map(java.util.Map) SnapshotInProgressAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SnapshotInProgressAllocationDecider) DecommissionAllocationDecider(io.crate.cluster.gracefulstop.DecommissionAllocationDecider) ParseField(org.elasticsearch.common.ParseField) NamedXContentRegistry(org.elasticsearch.common.xcontent.NamedXContentRegistry) ShardsLimitAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider) RestoreInProgressAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.RestoreInProgressAllocationDecider) MappingUpdatedAction(org.elasticsearch.cluster.action.index.MappingUpdatedAction) BalancedShardsAllocator(org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator) Setting(org.elasticsearch.common.settings.Setting) AbstractModule(org.elasticsearch.common.inject.AbstractModule) DiskThresholdDecider(org.elasticsearch.cluster.routing.allocation.decider.DiskThresholdDecider) Collection(java.util.Collection) Set(java.util.Set) NodeMappingRefreshAction(org.elasticsearch.cluster.action.index.NodeMappingRefreshAction) Objects(java.util.Objects) List(java.util.List) RebalanceOnlyWhenActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.RebalanceOnlyWhenActiveAllocationDecider) DataTypes(io.crate.types.DataTypes) ShardStateAction(org.elasticsearch.cluster.action.shard.ShardStateAction) AllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider) NodeVersionAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.NodeVersionAllocationDecider) MetadataDeleteIndexService(org.elasticsearch.cluster.metadata.MetadataDeleteIndexService) FilterAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider) ThrottlingAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider) ReplicaAfterPrimaryActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ReplicaAfterPrimaryActiveAllocationDecider) MaxRetryAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider) ClusterService(org.elasticsearch.cluster.service.ClusterService) NamedWriteable(org.elasticsearch.common.io.stream.NamedWriteable) HashMap(java.util.HashMap) IndexGraveyard(org.elasticsearch.cluster.metadata.IndexGraveyard) Function(java.util.function.Function) Supplier(java.util.function.Supplier) MetadataUpdateSettingsService(org.elasticsearch.cluster.metadata.MetadataUpdateSettingsService) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) Metadata(org.elasticsearch.cluster.metadata.Metadata) RepositoriesMetadata(org.elasticsearch.cluster.metadata.RepositoriesMetadata) AllocationDeciders(org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders) MetadataMappingService(org.elasticsearch.cluster.metadata.MetadataMappingService) ClusterRebalanceAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider) EnableAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider) ShardsAllocator(org.elasticsearch.cluster.routing.allocation.allocator.ShardsAllocator) ClusterSettings(org.elasticsearch.common.settings.ClusterSettings) IndexNameExpressionResolver(org.elasticsearch.cluster.metadata.IndexNameExpressionResolver) Collections(java.util.Collections) GatewayAllocator(org.elasticsearch.gateway.GatewayAllocator) Entry(org.elasticsearch.common.io.stream.NamedWriteableRegistry.Entry) ResizeAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ResizeAllocationDecider) SnapshotInProgressAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SnapshotInProgressAllocationDecider) EnableAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider) RebalanceOnlyWhenActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.RebalanceOnlyWhenActiveAllocationDecider) ThrottlingAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider) MaxRetryAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider) ReplicaAfterPrimaryActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ReplicaAfterPrimaryActiveAllocationDecider) LinkedHashMap(java.util.LinkedHashMap) ClusterRebalanceAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider) SameShardAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SameShardAllocationDecider) RestoreInProgressAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.RestoreInProgressAllocationDecider) FilterAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider) DiskThresholdDecider(org.elasticsearch.cluster.routing.allocation.decider.DiskThresholdDecider) ShardsLimitAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider) AwarenessAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.AwarenessAllocationDecider) DecommissionAllocationDecider(io.crate.cluster.gracefulstop.DecommissionAllocationDecider) NodeVersionAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.NodeVersionAllocationDecider) AwarenessAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.AwarenessAllocationDecider) ResizeAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ResizeAllocationDecider) SameShardAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SameShardAllocationDecider) ConcurrentRebalanceAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ConcurrentRebalanceAllocationDecider) SnapshotInProgressAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.SnapshotInProgressAllocationDecider) DecommissionAllocationDecider(io.crate.cluster.gracefulstop.DecommissionAllocationDecider) ShardsLimitAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ShardsLimitAllocationDecider) RestoreInProgressAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.RestoreInProgressAllocationDecider) RebalanceOnlyWhenActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.RebalanceOnlyWhenActiveAllocationDecider) AllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider) NodeVersionAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.NodeVersionAllocationDecider) FilterAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider) ThrottlingAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider) ReplicaAfterPrimaryActiveAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ReplicaAfterPrimaryActiveAllocationDecider) MaxRetryAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider) ClusterRebalanceAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ClusterRebalanceAllocationDecider) EnableAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider) ConcurrentRebalanceAllocationDecider(org.elasticsearch.cluster.routing.allocation.decider.ConcurrentRebalanceAllocationDecider)

Aggregations

BalancedShardsAllocator (org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator)3 AllocationDeciders (org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders)3 FilterAllocationDecider (org.elasticsearch.cluster.routing.allocation.decider.FilterAllocationDecider)3 ReplicaAfterPrimaryActiveAllocationDecider (org.elasticsearch.cluster.routing.allocation.decider.ReplicaAfterPrimaryActiveAllocationDecider)3 ArrayList (java.util.ArrayList)2 Collection (java.util.Collection)2 HashMap (java.util.HashMap)2 LinkedHashMap (java.util.LinkedHashMap)2 List (java.util.List)2 Map (java.util.Map)2 Objects (java.util.Objects)2 Function (java.util.function.Function)2 Supplier (java.util.function.Supplier)2 MappingUpdatedAction (org.elasticsearch.cluster.action.index.MappingUpdatedAction)2 NodeMappingRefreshAction (org.elasticsearch.cluster.action.index.NodeMappingRefreshAction)2 ShardStateAction (org.elasticsearch.cluster.action.shard.ShardStateAction)2 IndexGraveyard (org.elasticsearch.cluster.metadata.IndexGraveyard)2 IndexNameExpressionResolver (org.elasticsearch.cluster.metadata.IndexNameExpressionResolver)2 DelayedAllocationService (org.elasticsearch.cluster.routing.DelayedAllocationService)2 AllocationService (org.elasticsearch.cluster.routing.allocation.AllocationService)2