Package org.elasticsearch.cluster
Class ESAllocationTestCase.DelayedShardsMockGatewayAllocator
java.lang.Object
org.elasticsearch.gateway.GatewayAllocator
org.elasticsearch.cluster.ESAllocationTestCase.DelayedShardsMockGatewayAllocator
- All Implemented Interfaces:
ExistingShardsAllocator
- Enclosing class:
- ESAllocationTestCase
protected static class ESAllocationTestCase.DelayedShardsMockGatewayAllocator
extends GatewayAllocator
Mocks behavior in ReplicaShardAllocator to remove delayed shards from list of unassigned shards so they don't get reassigned yet.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator
ExistingShardsAllocator.UnassignedAllocationHandler
-
Field Summary
Fields inherited from class org.elasticsearch.gateway.GatewayAllocator
ALLOCATOR_NAME
Fields inherited from interface org.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator
EXISTING_SHARDS_ALLOCATOR_SETTING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterPrimariesBeforeReplicas
(RoutingAllocation allocation) void
allocateUnassigned
(ShardRouting shardRouting, RoutingAllocation allocation, ExistingShardsAllocator.UnassignedAllocationHandler unassignedAllocationHandler) void
applyFailedShards
(List<FailedShard> failedShards, RoutingAllocation allocation) void
applyStartedShards
(List<ShardRouting> startedShards, RoutingAllocation allocation) void
beforeAllocation
(RoutingAllocation allocation) Methods inherited from class org.elasticsearch.gateway.GatewayAllocator
cleanCaches, explainUnassignedShardAllocation, getNumberOfInFlightFetches, innerAllocatedUnassigned
-
Constructor Details
-
DelayedShardsMockGatewayAllocator
public DelayedShardsMockGatewayAllocator()
-
-
Method Details
-
applyStartedShards
- Specified by:
applyStartedShards
in interfaceExistingShardsAllocator
- Overrides:
applyStartedShards
in classGatewayAllocator
-
applyFailedShards
- Specified by:
applyFailedShards
in interfaceExistingShardsAllocator
- Overrides:
applyFailedShards
in classGatewayAllocator
-
beforeAllocation
- Specified by:
beforeAllocation
in interfaceExistingShardsAllocator
- Overrides:
beforeAllocation
in classGatewayAllocator
-
afterPrimariesBeforeReplicas
- Specified by:
afterPrimariesBeforeReplicas
in interfaceExistingShardsAllocator
- Overrides:
afterPrimariesBeforeReplicas
in classGatewayAllocator
-
allocateUnassigned
public void allocateUnassigned(ShardRouting shardRouting, RoutingAllocation allocation, ExistingShardsAllocator.UnassignedAllocationHandler unassignedAllocationHandler) - Specified by:
allocateUnassigned
in interfaceExistingShardsAllocator
- Overrides:
allocateUnassigned
in classGatewayAllocator
-