required changes after merge
This commit is contained in:
parent
eb8e03bc8b
commit
adcba69d96
|
@ -11,7 +11,6 @@ import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
|||
import org.elasticsearch.action.support.master.MasterNodeRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
@ -22,17 +21,7 @@ public class DeleteEnrichPolicyAction extends Action<AcknowledgedResponse> {
|
|||
public static final String NAME = "cluster:admin/xpack/enrich/delete";
|
||||
|
||||
private DeleteEnrichPolicyAction() {
|
||||
super(NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Writeable.Reader<AcknowledgedResponse> getResponseReader() {
|
||||
return AcknowledgedResponse::new;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
super(NAME, AcknowledgedResponse::new);
|
||||
}
|
||||
|
||||
public static class Request extends MasterNodeRequest<DeleteEnrichPolicyAction.Request> {
|
||||
|
|
|
@ -11,7 +11,6 @@ import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
|||
import org.elasticsearch.action.support.master.MasterNodeReadRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
@ -22,17 +21,7 @@ public class ExecuteEnrichPolicyAction extends Action<AcknowledgedResponse> {
|
|||
public static final String NAME = "cluster:admin/xpack/enrich/execute";
|
||||
|
||||
private ExecuteEnrichPolicyAction() {
|
||||
super(NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Writeable.Reader<AcknowledgedResponse> getResponseReader() {
|
||||
return AcknowledgedResponse::new;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
super(NAME, AcknowledgedResponse::new);
|
||||
}
|
||||
|
||||
public static class Request extends MasterNodeReadRequest<Request> {
|
||||
|
|
|
@ -11,7 +11,6 @@ import org.elasticsearch.action.ActionResponse;
|
|||
import org.elasticsearch.action.support.master.MasterNodeReadRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.common.xcontent.ToXContentObject;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.xpack.core.enrich.EnrichPolicy;
|
||||
|
@ -25,17 +24,7 @@ public class GetEnrichPolicyAction extends Action<GetEnrichPolicyAction.Response
|
|||
public static final String NAME = "cluster:admin/xpack/enrich/get";
|
||||
|
||||
private GetEnrichPolicyAction() {
|
||||
super(NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Writeable.Reader<Response> getResponseReader() {
|
||||
return Response::new;
|
||||
super(NAME, Response::new);
|
||||
}
|
||||
|
||||
public static class Request extends MasterNodeReadRequest<Request> {
|
||||
|
|
|
@ -11,7 +11,6 @@ import org.elasticsearch.action.ActionResponse;
|
|||
import org.elasticsearch.action.support.master.MasterNodeRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.common.xcontent.ToXContentObject;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.xpack.core.enrich.EnrichPolicy;
|
||||
|
@ -29,17 +28,7 @@ public class ListEnrichPolicyAction extends Action<ListEnrichPolicyAction.Respon
|
|||
public static final String NAME = "cluster:admin/xpack/enrich/list";
|
||||
|
||||
private ListEnrichPolicyAction() {
|
||||
super(NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Writeable.Reader<Response> getResponseReader() {
|
||||
return Response::new;
|
||||
super(NAME, Response::new);
|
||||
}
|
||||
|
||||
public static class Request extends MasterNodeRequest<ListEnrichPolicyAction.Request> {
|
||||
|
|
|
@ -11,7 +11,6 @@ import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
|||
import org.elasticsearch.action.support.master.MasterNodeRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
import org.elasticsearch.xpack.core.enrich.EnrichPolicy;
|
||||
|
||||
|
@ -24,23 +23,13 @@ public class PutEnrichPolicyAction extends Action<AcknowledgedResponse> {
|
|||
public static final String NAME = "cluster:admin/xpack/enrich/put";
|
||||
|
||||
private PutEnrichPolicyAction() {
|
||||
super(NAME);
|
||||
super(NAME, AcknowledgedResponse::new);
|
||||
}
|
||||
|
||||
public static Request fromXContent(XContentParser parser, String name) throws IOException {
|
||||
return new Request(name, EnrichPolicy.fromXContent(parser));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Writeable.Reader<AcknowledgedResponse> getResponseReader() {
|
||||
return AcknowledgedResponse::new;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
public static class Request extends MasterNodeRequest<PutEnrichPolicyAction.Request> {
|
||||
|
||||
private final EnrichPolicy policy;
|
||||
|
|
Loading…
Reference in New Issue