Package org.elasticsearch.gateway
Class GatewayAllocator
java.lang.Object
org.elasticsearch.gateway.GatewayAllocator
public class GatewayAllocator
extends java.lang.Object
-
Constructor Summary
Constructors Modifier Constructor Description protected
GatewayAllocator()
GatewayAllocator(RerouteService rerouteService, TransportNodesListGatewayStartedShards startedAction, TransportNodesListShardStoreMetaData storeAction)
-
Method Summary
Modifier and Type Method Description void
allocateUnassigned(RoutingAllocation allocation)
void
applyFailedShards(RoutingAllocation allocation, java.util.List<FailedShard> failedShards)
void
applyStartedShards(RoutingAllocation allocation, java.util.List<ShardRouting> startedShards)
void
cleanCaches()
AllocateUnassignedDecision
decideUnassignedShardAllocation(ShardRouting unassignedShard, RoutingAllocation routingAllocation)
Computes and returns the design for allocating a single unassigned shard.int
getNumberOfInFlightFetch()
protected static void
innerAllocatedUnassigned(RoutingAllocation allocation, PrimaryShardAllocator primaryShardAllocator, ReplicaShardAllocator replicaShardAllocator)
-
Constructor Details
-
GatewayAllocator
@Inject public GatewayAllocator(RerouteService rerouteService, TransportNodesListGatewayStartedShards startedAction, TransportNodesListShardStoreMetaData storeAction) -
GatewayAllocator
protected GatewayAllocator()
-
-
Method Details
-
cleanCaches
public void cleanCaches() -
getNumberOfInFlightFetch
public int getNumberOfInFlightFetch() -
applyStartedShards
public void applyStartedShards(RoutingAllocation allocation, java.util.List<ShardRouting> startedShards) -
applyFailedShards
public void applyFailedShards(RoutingAllocation allocation, java.util.List<FailedShard> failedShards) -
allocateUnassigned
-
innerAllocatedUnassigned
protected static void innerAllocatedUnassigned(RoutingAllocation allocation, PrimaryShardAllocator primaryShardAllocator, ReplicaShardAllocator replicaShardAllocator) -
decideUnassignedShardAllocation
public AllocateUnassignedDecision decideUnassignedShardAllocation(ShardRouting unassignedShard, RoutingAllocation routingAllocation)Computes and returns the design for allocating a single unassigned shard. If called on an assigned shard,AllocateUnassignedDecision.NOT_TAKEN
is returned.
-