bug fix: create empty response in post data action for serialization
added getter for data counts and initialize resetStart / resetEnd with empty strings Original commit: elastic/x-pack-elasticsearch@d4925506e6
This commit is contained in:
parent
15c9e8baa4
commit
5214de23a1
|
@ -53,7 +53,7 @@ public class PostDataAction extends Action<PostDataAction.Request, PostDataActio
|
|||
|
||||
@Override
|
||||
public Response newResponse() {
|
||||
return null;
|
||||
return new Response();
|
||||
}
|
||||
|
||||
static class RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder> {
|
||||
|
@ -71,10 +71,17 @@ public class PostDataAction extends Action<PostDataAction.Request, PostDataActio
|
|||
dataCounts = new DataCounts(jobId);
|
||||
}
|
||||
|
||||
private Response() {
|
||||
}
|
||||
|
||||
public Response(DataCounts counts) {
|
||||
this.dataCounts = counts;
|
||||
}
|
||||
|
||||
public DataCounts getDataCounts() {
|
||||
return dataCounts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFrom(StreamInput in) throws IOException {
|
||||
super.readFrom(in);
|
||||
|
@ -125,8 +132,8 @@ public class PostDataAction extends Action<PostDataAction.Request, PostDataActio
|
|||
|
||||
private String jobId;
|
||||
private boolean ignoreDowntime = false;
|
||||
private String resetStart;
|
||||
private String resetEnd;
|
||||
private String resetStart = "";
|
||||
private String resetEnd = "";
|
||||
private BytesReference content;
|
||||
|
||||
Request() {
|
||||
|
|
Loading…
Reference in New Issue