diff options
author | Ali Beyad <ali@elastic.co> | 2016-09-23 09:31:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-23 09:31:46 -0400 |
commit | ac1b13dde7e158d85ce6d7f314f3e823e012bec9 (patch) | |
tree | 0133c3c321dfe1ed4bc8a8afa5eed9cb4f9f18ab /benchmarks/src/main/java | |
parent | 029fc909b54bf3ed60b6de9b6309aa7d8ec58987 (diff) |
Changes the API of GatewayAllocator#applyStartedShards and (#20642)
Changes the API of GatewayAllocator#applyStartedShards and
GatewayAllocator#applyFailedShards to take both a RoutingAllocation
and a list of shards to apply. This allows better mock allocators
to be created as being done in #20637.
Closes #20642
Diffstat (limited to 'benchmarks/src/main/java')
-rw-r--r-- | benchmarks/src/main/java/org/elasticsearch/benchmark/routing/allocation/Allocators.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/benchmarks/src/main/java/org/elasticsearch/benchmark/routing/allocation/Allocators.java b/benchmarks/src/main/java/org/elasticsearch/benchmark/routing/allocation/Allocators.java index e6c355eeaf..860137cf55 100644 --- a/benchmarks/src/main/java/org/elasticsearch/benchmark/routing/allocation/Allocators.java +++ b/benchmarks/src/main/java/org/elasticsearch/benchmark/routing/allocation/Allocators.java @@ -24,6 +24,7 @@ import org.elasticsearch.cluster.EmptyClusterInfoService; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.cluster.routing.allocation.AllocationService; +import org.elasticsearch.cluster.routing.allocation.FailedShard; import org.elasticsearch.cluster.routing.allocation.RoutingAllocation; import org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator; import org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider; @@ -37,6 +38,7 @@ import org.elasticsearch.gateway.GatewayAllocator; import java.lang.reflect.InvocationTargetException; import java.util.Collection; import java.util.Collections; +import java.util.List; import java.util.Map; public final class Allocators { @@ -48,12 +50,12 @@ public final class Allocators { } @Override - public void applyStartedShard(ShardRouting shardRouting) { + public void applyStartedShards(RoutingAllocation allocation, List<ShardRouting> startedShards) { // noop } @Override - public void applyFailedShard(ShardRouting shardRouting) { + public void applyFailedShards(RoutingAllocation allocation, List<FailedShard> failedShards) { // noop } |