From d0634e444d71ef351b2d045490eae60e50e058aa Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Tue, 25 Jun 2019 10:09:29 +0200 Subject: [PATCH] Fixed compile errors after merge. --- .../core/enrich/action/DeleteEnrichPolicyAction.java | 8 +++++++- .../core/enrich/action/ExecuteEnrichPolicyAction.java | 8 +++++++- .../xpack/core/enrich/action/PutEnrichPolicyAction.java | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/DeleteEnrichPolicyAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/DeleteEnrichPolicyAction.java index 3997a3364a4..f892d84bec6 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/DeleteEnrichPolicyAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/DeleteEnrichPolicyAction.java @@ -11,6 +11,7 @@ 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; @@ -24,9 +25,14 @@ public class DeleteEnrichPolicyAction extends Action { super(NAME); } + @Override + public Writeable.Reader getResponseReader() { + return AcknowledgedResponse::new; + } + @Override public AcknowledgedResponse newResponse() { - return new AcknowledgedResponse(); + throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable"); } public static class Request extends MasterNodeRequest { diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/ExecuteEnrichPolicyAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/ExecuteEnrichPolicyAction.java index 89bd874ca18..7493c1e3291 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/ExecuteEnrichPolicyAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/ExecuteEnrichPolicyAction.java @@ -11,6 +11,7 @@ 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; @@ -24,9 +25,14 @@ public class ExecuteEnrichPolicyAction extends Action { super(NAME); } + @Override + public Writeable.Reader getResponseReader() { + return AcknowledgedResponse::new; + } + @Override public AcknowledgedResponse newResponse() { - return new AcknowledgedResponse(); + throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable"); } public static class Request extends MasterNodeReadRequest { diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/PutEnrichPolicyAction.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/PutEnrichPolicyAction.java index a647e4fb1fa..1020da2ee9f 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/PutEnrichPolicyAction.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/action/PutEnrichPolicyAction.java @@ -11,6 +11,7 @@ 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; @@ -30,9 +31,14 @@ public class PutEnrichPolicyAction extends Action { return new Request(name, EnrichPolicy.fromXContent(parser)); } + @Override + public Writeable.Reader getResponseReader() { + return AcknowledgedResponse::new; + } + @Override public AcknowledgedResponse newResponse() { - return new AcknowledgedResponse(); + throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable"); } public static class Request extends MasterNodeRequest {