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_NAMEFields inherited from interface org.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator
EXISTING_SHARDS_ALLOCATOR_SETTING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterPrimariesBeforeReplicas(RoutingAllocation allocation, Predicate<ShardRouting> isRelevantShardPredicate) voidallocateUnassigned(ShardRouting shardRouting, RoutingAllocation allocation, ExistingShardsAllocator.UnassignedAllocationHandler unassignedAllocationHandler) voidapplyFailedShards(List<FailedShard> failedShards, RoutingAllocation allocation) voidapplyStartedShards(List<ShardRouting> startedShards, RoutingAllocation allocation) voidbeforeAllocation(RoutingAllocation allocation) Methods inherited from class org.elasticsearch.gateway.GatewayAllocator
cleanCaches, explainUnassignedShardAllocation, getNumberOfInFlightFetches, innerAllocatedUnassigned
-
Constructor Details
-
DelayedShardsMockGatewayAllocator
public DelayedShardsMockGatewayAllocator()
-
-
Method Details
-
applyStartedShards
- Specified by:
applyStartedShardsin interfaceExistingShardsAllocator- Overrides:
applyStartedShardsin classGatewayAllocator
-
applyFailedShards
- Specified by:
applyFailedShardsin interfaceExistingShardsAllocator- Overrides:
applyFailedShardsin classGatewayAllocator
-
beforeAllocation
- Specified by:
beforeAllocationin interfaceExistingShardsAllocator- Overrides:
beforeAllocationin classGatewayAllocator
-
afterPrimariesBeforeReplicas
public void afterPrimariesBeforeReplicas(RoutingAllocation allocation, Predicate<ShardRouting> isRelevantShardPredicate) - Specified by:
afterPrimariesBeforeReplicasin interfaceExistingShardsAllocator- Overrides:
afterPrimariesBeforeReplicasin classGatewayAllocator
-
allocateUnassigned
public void allocateUnassigned(ShardRouting shardRouting, RoutingAllocation allocation, ExistingShardsAllocator.UnassignedAllocationHandler unassignedAllocationHandler) - Specified by:
allocateUnassignedin interfaceExistingShardsAllocator- Overrides:
allocateUnassignedin classGatewayAllocator
-