ClusterState applyFailedShards(ClusterState currentState, List<FailedShard> failedShards, List<StaleShard> staleShards) { return allocationService.applyFailedShards(currentState, failedShards, staleShards); }
public ClusterState applyFailedShards(ClusterState clusterState, List<FailedShard> failedShards) { return applyFailedShards(clusterState, failedShards, emptyList()); }
public ClusterState applyFailedShard(ClusterState clusterState, ShardRouting failedShard, boolean markAsStale) { return applyFailedShards(clusterState, singletonList(new FailedShard(failedShard, null, null, markAsStale)), emptyList()); }
ClusterState applyFailedShards(ClusterState currentState, List<FailedShard> failedShards, List<StaleShard> staleShards) { return allocationService.applyFailedShards(currentState, failedShards, staleShards); }
ClusterState applyFailedShards(ClusterState currentState, List<FailedShard> failedShards, List<StaleShard> staleShards) { return allocationService.applyFailedShards(currentState, failedShards, staleShards); }
ClusterState applyFailedShards(ClusterState currentState, List<FailedShard> failedShards, List<StaleShard> staleShards) { return allocationService.applyFailedShards(currentState, failedShards, staleShards); }
public ClusterState applyFailedShards(ClusterState clusterState, List<FailedShard> failedShards) { return applyFailedShards(clusterState, failedShards, emptyList()); }
public ClusterState applyFailedShards(ClusterState clusterState, List<FailedShard> failedShards) { return applyFailedShards(clusterState, failedShards, Collections.emptyList()); }
public ClusterState applyFailedShards(ClusterState clusterState, List<FailedShard> failedShards) { return applyFailedShards(clusterState, failedShards, emptyList()); }
public ClusterState applyFailedShard(ClusterState clusterState, ShardRouting failedShard) { return applyFailedShards(clusterState, Collections.singletonList(new FailedShard(failedShard, null, null)), Collections.emptyList()); }
public ClusterState applyFailedShard(ClusterState clusterState, ShardRouting failedShard, boolean markAsStale) { return applyFailedShards(clusterState, singletonList(new FailedShard(failedShard, null, null, markAsStale)), emptyList()); }
public RoutingAllocation.Result applyFailedShard(ClusterState clusterState, ShardRouting failedShard) { return applyFailedShards(clusterState, Collections.singletonList(new FailedRerouteAllocation.FailedShard(failedShard, null, null))); }
public ClusterState applyFailedShard(ClusterState clusterState, ShardRouting failedShard, boolean markAsStale) { return applyFailedShards(clusterState, singletonList(new FailedShard(failedShard, null, null, markAsStale)), emptyList()); }
@Override public BatchResult<ShardRoutingEntry> execute(ClusterState currentState, List<ShardRoutingEntry> tasks) throws Exception { BatchResult.Builder<ShardRoutingEntry> batchResultBuilder = BatchResult.builder(); List<FailedRerouteAllocation.FailedShard> shardRoutingsToBeApplied = new ArrayList<>(tasks.size()); for (ShardRoutingEntry task : tasks) { shardRoutingsToBeApplied.add(new FailedRerouteAllocation.FailedShard(task.shardRouting, task.message, task.failure)); } ClusterState maybeUpdatedState = currentState; try { RoutingAllocation.Result result = allocationService.applyFailedShards(currentState, shardRoutingsToBeApplied); if (result.changed()) { maybeUpdatedState = ClusterState.builder(currentState).routingResult(result).build(); } batchResultBuilder.successes(tasks); } catch (Throwable t) { batchResultBuilder.failures(tasks, t); } return batchResultBuilder.build(maybeUpdatedState); }