Package org.elasticsearch.cluster
Class ESAllocationTestCase.DelayedShardsMockGatewayAllocator
java.lang.Object
org.elasticsearch.gateway.GatewayAllocator
org.elasticsearch.cluster.ESAllocationTestCase.DelayedShardsMockGatewayAllocator
- All Implemented Interfaces:
org.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator
- Enclosing class:
- ESAllocationTestCase
protected static class ESAllocationTestCase.DelayedShardsMockGatewayAllocator
extends org.elasticsearch.gateway.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
org.elasticsearch.cluster.routing.allocation.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(org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation) voidallocateUnassigned(org.elasticsearch.cluster.routing.ShardRouting shardRouting, org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation, org.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator.UnassignedAllocationHandler unassignedAllocationHandler) voidapplyFailedShards(List<org.elasticsearch.cluster.routing.allocation.FailedShard> failedShards, org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation) voidapplyStartedShards(List<org.elasticsearch.cluster.routing.ShardRouting> startedShards, org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation) voidbeforeAllocation(org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation) Methods inherited from class org.elasticsearch.gateway.GatewayAllocator
cleanCaches, explainUnassignedShardAllocation, getNumberOfInFlightFetches, innerAllocatedUnassigned
-
Constructor Details
-
DelayedShardsMockGatewayAllocator
public DelayedShardsMockGatewayAllocator()
-
-
Method Details
-
applyStartedShards
public void applyStartedShards(List<org.elasticsearch.cluster.routing.ShardRouting> startedShards, org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation) - Specified by:
applyStartedShardsin interfaceorg.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator- Overrides:
applyStartedShardsin classorg.elasticsearch.gateway.GatewayAllocator
-
applyFailedShards
public void applyFailedShards(List<org.elasticsearch.cluster.routing.allocation.FailedShard> failedShards, org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation) - Specified by:
applyFailedShardsin interfaceorg.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator- Overrides:
applyFailedShardsin classorg.elasticsearch.gateway.GatewayAllocator
-
beforeAllocation
public void beforeAllocation(org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation) - Specified by:
beforeAllocationin interfaceorg.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator- Overrides:
beforeAllocationin classorg.elasticsearch.gateway.GatewayAllocator
-
afterPrimariesBeforeReplicas
public void afterPrimariesBeforeReplicas(org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation) - Specified by:
afterPrimariesBeforeReplicasin interfaceorg.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator- Overrides:
afterPrimariesBeforeReplicasin classorg.elasticsearch.gateway.GatewayAllocator
-
allocateUnassigned
public void allocateUnassigned(org.elasticsearch.cluster.routing.ShardRouting shardRouting, org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation, org.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator.UnassignedAllocationHandler unassignedAllocationHandler) - Specified by:
allocateUnassignedin interfaceorg.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator- Overrides:
allocateUnassignedin classorg.elasticsearch.gateway.GatewayAllocator
-