Rename variable for clarity in ShardFailedClusterStateHandler#execute

This commit is contained in:
Jason Tedor 2015-12-03 13:41:34 -05:00
parent 413688b0ca
commit 73a2d3085a
1 changed files with 4 additions and 4 deletions

View File

@ -152,7 +152,7 @@ public class ShardStateAction extends AbstractComponent {
class ShardFailedClusterStateHandler implements ClusterStateTaskExecutor<ShardRoutingEntry>, ClusterStateTaskListener {
@Override
public BatchResult<ShardRoutingEntry> execute(ClusterState currentState, List<ShardRoutingEntry> tasks) throws Exception {
BatchResult.Builder<ShardRoutingEntry> builder = BatchResult.builder();
BatchResult.Builder<ShardRoutingEntry> batchResultBuilder = BatchResult.builder();
List<FailedRerouteAllocation.FailedShard> shardRoutingsToBeApplied = new ArrayList<>(tasks.size());
for (ShardRoutingEntry task : tasks) {
task.processed = true;
@ -164,11 +164,11 @@ public class ShardStateAction extends AbstractComponent {
if (result.changed()) {
maybeUpdatedState = ClusterState.builder(currentState).routingResult(result).build();
}
builder.successes(tasks);
batchResultBuilder.successes(tasks);
} catch (Throwable t) {
builder.failures(tasks, t);
batchResultBuilder.failures(tasks, t);
}
return builder.build(maybeUpdatedState);
return batchResultBuilder.build(maybeUpdatedState);
}
@Override