Skip to content

Commit

Permalink
Adapt ShardFollowTasksExecutor after #31031
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrx committed Jun 15, 2018
1 parent 9c03b48 commit 18938aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
import org.elasticsearch.index.shard.ShardId;
import org.elasticsearch.index.translog.Translog;
import org.elasticsearch.persistent.AllocatedPersistentTask;
import org.elasticsearch.persistent.PersistentTaskState;
import org.elasticsearch.persistent.PersistentTasksCustomMetaData;
import org.elasticsearch.persistent.PersistentTasksExecutor;
import org.elasticsearch.tasks.Task;
import org.elasticsearch.tasks.TaskId;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.xpack.ccr.Ccr;
Expand Down Expand Up @@ -105,7 +105,7 @@ protected AllocatedPersistentTask createTask(long id, String type, String action
}

@Override
protected void nodeOperation(AllocatedPersistentTask task, ShardFollowTask params, Task.Status status) {
protected void nodeOperation(final AllocatedPersistentTask task, final ShardFollowTask params, final PersistentTaskState state) {
ShardFollowNodeTask shardFollowNodeTask = (ShardFollowNodeTask) task;
Client leaderClient = wrapClient(params.getLeaderClusterAlias() != null ?
this.client.getRemoteClusterClient(params.getLeaderClusterAlias()) : this.client, params);
Expand All @@ -119,7 +119,7 @@ protected void nodeOperation(AllocatedPersistentTask task, ShardFollowTask param
fetchGlobalCheckpoint(followerClient, params.getFollowShardId(),
followGlobalCheckPoint -> {
shardFollowNodeTask.updateProcessedGlobalCheckpoint(followGlobalCheckPoint);
prepare(leaderClient, followerClient,shardFollowNodeTask, params, followGlobalCheckPoint, imdVersionChecker);
prepare(leaderClient, followerClient, shardFollowNodeTask, params, followGlobalCheckPoint, imdVersionChecker);
}, task::markAsFailed);
} else {
shardFollowNodeTask.markAsFailed(e);
Expand Down

This file was deleted.

0 comments on commit 18938aa

Please sign in to comment.