Return task as nodeId:taskId
This commit is contained in:
parent
6a2acd348a
commit
d483901434
|
@ -73,10 +73,7 @@ public abstract class AbstractBaseReindexRestHandler<Request extends ActionReque
|
||||||
private void sendTask(RestChannel channel, Task task) throws IOException {
|
private void sendTask(RestChannel channel, Task task) throws IOException {
|
||||||
XContentBuilder builder = channel.newBuilder();
|
XContentBuilder builder = channel.newBuilder();
|
||||||
builder.startObject();
|
builder.startObject();
|
||||||
builder.startObject("task");
|
builder.field("task", clusterService.localNode().getId() + ":" + task.getId());
|
||||||
builder.field("node", clusterService.localNode().getId());
|
|
||||||
builder.field("id", task.getId());
|
|
||||||
builder.endObject();
|
|
||||||
builder.endObject();
|
builder.endObject();
|
||||||
channel.sendResponse(new BytesRestResponse(RestStatus.OK, builder));
|
channel.sendResponse(new BytesRestResponse(RestStatus.OK, builder));
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
- match: {batches: 1}
|
- match: {batches: 1}
|
||||||
- match: {failures: []}
|
- match: {failures: []}
|
||||||
- is_true: took
|
- is_true: took
|
||||||
|
- is_false: task
|
||||||
|
|
||||||
---
|
---
|
||||||
"Response format for updated":
|
"Response format for updated":
|
||||||
|
@ -53,6 +54,7 @@
|
||||||
- match: {batches: 1}
|
- match: {batches: 1}
|
||||||
- match: {failures: []}
|
- match: {failures: []}
|
||||||
- is_true: took
|
- is_true: took
|
||||||
|
- is_false: task
|
||||||
|
|
||||||
---
|
---
|
||||||
"wait_for_completion=false":
|
"wait_for_completion=false":
|
||||||
|
@ -73,8 +75,7 @@
|
||||||
index: source
|
index: source
|
||||||
dest:
|
dest:
|
||||||
index: dest
|
index: dest
|
||||||
- is_true: task.node
|
- match: {task: '/.+:\d+/'}
|
||||||
- is_true: task.id
|
|
||||||
- is_false: updated
|
- is_false: updated
|
||||||
- is_false: version_conflicts
|
- is_false: version_conflicts
|
||||||
- is_false: batches
|
- is_false: batches
|
||||||
|
|
|
@ -18,7 +18,8 @@
|
||||||
- match: {failures: []}
|
- match: {failures: []}
|
||||||
- match: {noops: 0}
|
- match: {noops: 0}
|
||||||
- is_true: took
|
- is_true: took
|
||||||
- is_false: created # This shouldn't be included in the response
|
- is_false: created # Update by query can't create
|
||||||
|
- is_false: task
|
||||||
|
|
||||||
---
|
---
|
||||||
"wait_for_completion=false":
|
"wait_for_completion=false":
|
||||||
|
@ -35,8 +36,7 @@
|
||||||
update-by-query:
|
update-by-query:
|
||||||
wait_for_completion: false
|
wait_for_completion: false
|
||||||
index: test
|
index: test
|
||||||
- is_true: task.node
|
- match: {task: '/.+:\d+/'}
|
||||||
- is_true: task.id
|
|
||||||
- is_false: updated
|
- is_false: updated
|
||||||
- is_false: version_conflicts
|
- is_false: version_conflicts
|
||||||
- is_false: batches
|
- is_false: batches
|
||||||
|
|
Loading…
Reference in New Issue