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 {
|
||||
XContentBuilder builder = channel.newBuilder();
|
||||
builder.startObject();
|
||||
builder.startObject("task");
|
||||
builder.field("node", clusterService.localNode().getId());
|
||||
builder.field("id", task.getId());
|
||||
builder.endObject();
|
||||
builder.field("task", clusterService.localNode().getId() + ":" + task.getId());
|
||||
builder.endObject();
|
||||
channel.sendResponse(new BytesRestResponse(RestStatus.OK, builder));
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
- match: {batches: 1}
|
||||
- match: {failures: []}
|
||||
- is_true: took
|
||||
- is_false: task
|
||||
|
||||
---
|
||||
"Response format for updated":
|
||||
|
@ -53,6 +54,7 @@
|
|||
- match: {batches: 1}
|
||||
- match: {failures: []}
|
||||
- is_true: took
|
||||
- is_false: task
|
||||
|
||||
---
|
||||
"wait_for_completion=false":
|
||||
|
@ -73,8 +75,7 @@
|
|||
index: source
|
||||
dest:
|
||||
index: dest
|
||||
- is_true: task.node
|
||||
- is_true: task.id
|
||||
- match: {task: '/.+:\d+/'}
|
||||
- is_false: updated
|
||||
- is_false: version_conflicts
|
||||
- is_false: batches
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
- match: {failures: []}
|
||||
- match: {noops: 0}
|
||||
- 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":
|
||||
|
@ -35,8 +36,7 @@
|
|||
update-by-query:
|
||||
wait_for_completion: false
|
||||
index: test
|
||||
- is_true: task.node
|
||||
- is_true: task.id
|
||||
- match: {task: '/.+:\d+/'}
|
||||
- is_false: updated
|
||||
- is_false: version_conflicts
|
||||
- is_false: batches
|
||||
|
|
Loading…
Reference in New Issue