Persistent Tasks: remove unused isCurrentStatus method (elastic/x-pack-elasticsearch#2076)
Removes a method that is no longer used in production code. Relates to elastic/x-pack-elasticsearch#957 Original commit: elastic/x-pack-elasticsearch@84fcb9db8a
This commit is contained in:
parent
3914d66cea
commit
4da7ae21bc
|
@ -393,14 +393,6 @@ public final class PersistentTasksCustomMetaData extends AbstractNamedDiffable<M
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Whether the task status isn't stale. When a task gets unassigned from the executor node or assigned
|
|
||||||
* to a new executor node and the status hasn't been updated then the task status is stale.
|
|
||||||
*/
|
|
||||||
public boolean isCurrentStatus() {
|
|
||||||
return allocationIdOnLastStatusUpdate != null && allocationIdOnLastStatusUpdate == allocationId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params xParams) throws IOException {
|
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params xParams) throws IOException {
|
||||||
builder.startObject();
|
builder.startObject();
|
||||||
|
|
|
@ -188,7 +188,7 @@ public class PersistentTasksExecutorIT extends ESIntegTestCase {
|
||||||
int finalI = i;
|
int finalI = i;
|
||||||
WaitForPersistentTaskStatusFuture<?> future1 = new WaitForPersistentTaskStatusFuture<>();
|
WaitForPersistentTaskStatusFuture<?> future1 = new WaitForPersistentTaskStatusFuture<>();
|
||||||
persistentTasksService.waitForPersistentTaskStatus(taskId,
|
persistentTasksService.waitForPersistentTaskStatus(taskId,
|
||||||
task -> task != null && task.isCurrentStatus() && task.getStatus().toString() != null &&
|
task -> task != null && task.getStatus() != null && task.getStatus().toString() != null &&
|
||||||
task.getStatus().toString().equals("{\"phase\":\"phase " + (finalI + 1) + "\"}"),
|
task.getStatus().toString().equals("{\"phase\":\"phase " + (finalI + 1) + "\"}"),
|
||||||
TimeValue.timeValueSeconds(10), future1);
|
TimeValue.timeValueSeconds(10), future1);
|
||||||
assertThat(future1.get().getId(), equalTo(taskId));
|
assertThat(future1.get().getId(), equalTo(taskId));
|
||||||
|
|
Loading…
Reference in New Issue