public abstract class PrimaryShardAllocator extends BaseGatewayShardAllocator
BalancedShardsAllocator),
nor does it allocate primaries when a primary shard failed and there is a valid replica
copy that can immediately be promoted to primary, as this takes place in RoutingNodes.failShard(org.apache.logging.log4j.Logger, org.elasticsearch.cluster.routing.ShardRouting, org.elasticsearch.cluster.routing.UnassignedInfo, org.elasticsearch.cluster.metadata.IndexMetaData, org.elasticsearch.cluster.routing.RoutingChangesObserver).deprecationLogger, logger, settings| Constructor and Description |
|---|
PrimaryShardAllocator(Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
protected static org.elasticsearch.gateway.PrimaryShardAllocator.NodeShardsResult |
buildNodeShardsResult(ShardRouting shard,
boolean matchAnyShard,
java.util.Set<java.lang.String> ignoreNodes,
java.util.Set<java.lang.String> inSyncAllocationIds,
AsyncShardFetch.FetchResult<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> shardState,
org.apache.logging.log4j.Logger logger)
Builds a list of nodes.
|
protected abstract AsyncShardFetch.FetchResult<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> |
fetchData(ShardRouting shard,
RoutingAllocation allocation) |
AllocateUnassignedDecision |
makeAllocationDecision(ShardRouting unassignedShard,
RoutingAllocation allocation,
org.apache.logging.log4j.Logger logger)
Make a decision on the allocation of an unassigned shard.
|
allocateUnassigned, buildDecisionsForAllNodeslogDeprecatedSetting, logRemovedSetting, nodeNamepublic PrimaryShardAllocator(Settings settings)
public AllocateUnassignedDecision makeAllocationDecision(ShardRouting unassignedShard, RoutingAllocation allocation, org.apache.logging.log4j.Logger logger)
BaseGatewayShardAllocatorBaseGatewayShardAllocator.allocateUnassigned(RoutingAllocation) to make decisions about whether or not
the shard can be allocated by this allocator and if so, to which node it will be allocated.makeAllocationDecision in class BaseGatewayShardAllocatorunassignedShard - the unassigned shard to allocateallocation - the current routing statelogger - the loggerAllocateUnassignedDecision with the final decision of whether to allocate and details of the decisionprotected static org.elasticsearch.gateway.PrimaryShardAllocator.NodeShardsResult buildNodeShardsResult(ShardRouting shard, boolean matchAnyShard, java.util.Set<java.lang.String> ignoreNodes, java.util.Set<java.lang.String> inSyncAllocationIds, AsyncShardFetch.FetchResult<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> shardState, org.apache.logging.log4j.Logger logger)
protected abstract AsyncShardFetch.FetchResult<TransportNodesListGatewayStartedShards.NodeGatewayStartedShards> fetchData(ShardRouting shard, RoutingAllocation allocation)