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
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DelayedShardsMockGatewayAllocator()
-
Method Summary
Modifier and Type Method Description void
afterPrimariesBeforeReplicas(org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation)
void
allocateUnassigned(org.elasticsearch.cluster.routing.ShardRouting shardRouting, org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation, org.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator.UnassignedAllocationHandler unassignedAllocationHandler)
void
applyFailedShards(java.util.List<org.elasticsearch.cluster.routing.allocation.FailedShard> failedShards, org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation)
void
applyStartedShards(java.util.List<org.elasticsearch.cluster.routing.ShardRouting> startedShards, org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation)
void
beforeAllocation(org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation)
-
Constructor Details
-
DelayedShardsMockGatewayAllocator
public DelayedShardsMockGatewayAllocator()
-
-
Method Details
-
applyStartedShards
public void applyStartedShards(java.util.List<org.elasticsearch.cluster.routing.ShardRouting> startedShards, org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation)- Specified by:
applyStartedShards
in interfaceorg.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator
- Overrides:
applyStartedShards
in classorg.elasticsearch.gateway.GatewayAllocator
-
applyFailedShards
public void applyFailedShards(java.util.List<org.elasticsearch.cluster.routing.allocation.FailedShard> failedShards, org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation)- Specified by:
applyFailedShards
in interfaceorg.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator
- Overrides:
applyFailedShards
in classorg.elasticsearch.gateway.GatewayAllocator
-
beforeAllocation
public void beforeAllocation(org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation)- Specified by:
beforeAllocation
in interfaceorg.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator
- Overrides:
beforeAllocation
in classorg.elasticsearch.gateway.GatewayAllocator
-
afterPrimariesBeforeReplicas
public void afterPrimariesBeforeReplicas(org.elasticsearch.cluster.routing.allocation.RoutingAllocation allocation)- Specified by:
afterPrimariesBeforeReplicas
in interfaceorg.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator
- Overrides:
afterPrimariesBeforeReplicas
in 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:
allocateUnassigned
in interfaceorg.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator
- Overrides:
allocateUnassigned
in classorg.elasticsearch.gateway.GatewayAllocator
-