From a2caa51220bfe5b9b40d1beb516c95c593298925 Mon Sep 17 00:00:00 2001 From: Tal Levy Date: Thu, 31 Aug 2017 12:37:25 -0700 Subject: [PATCH 1/2] migrate some MasterNodeRequest subclasses to Writeable Readers --- .../ClusterAllocationExplainRequest.java | 44 ++++---- ...ansportClusterAllocationExplainAction.java | 2 +- .../cluster/health/ClusterHealthRequest.java | 102 +++++++++--------- .../health/TransportClusterHealthAction.java | 2 +- .../cluster/remote/RemoteInfoRequest.java | 11 ++ .../remote/TransportRemoteInfoAction.java | 4 +- .../create/CreateSnapshotRequest.java | 48 +++++---- .../create/TransportCreateSnapshotAction.java | 2 +- .../delete/DeleteSnapshotRequest.java | 24 +++-- .../delete/TransportDeleteSnapshotAction.java | 2 +- .../snapshots/get/GetSnapshotsRequest.java | 40 +++---- .../get/TransportGetSnapshotsAction.java | 4 +- .../restore/RestoreSnapshotRequest.java | 68 ++++++------ .../TransportRestoreSnapshotAction.java | 2 +- .../status/SnapshotsStatusRequest.java | 28 ++--- .../TransportSnapshotsStatusAction.java | 2 +- .../support/HandledTransportAction.java | 4 +- .../support/master/MasterNodeReadRequest.java | 22 ++-- .../support/master/MasterNodeRequest.java | 19 ++-- .../master/TransportMasterNodeAction.java | 21 +++- .../master/TransportMasterNodeReadAction.java | 15 +++ .../ClusterAllocationExplainRequestTests.java | 3 +- .../hamcrest/ElasticsearchAssertions.java | 4 + 23 files changed, 282 insertions(+), 191 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainRequest.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainRequest.java index aea1ee57dca87..40960c3362086 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainRequest.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainRequest.java @@ -67,6 +67,17 @@ public ClusterAllocationExplainRequest() { this.currentNode = null; } + public ClusterAllocationExplainRequest(StreamInput in) throws IOException { + super(in); + checkVersion(in.getVersion()); + this.index = in.readOptionalString(); + this.shard = in.readOptionalVInt(); + this.primary = in.readOptionalBoolean(); + this.currentNode = in.readOptionalString(); + this.includeYesDecisions = in.readBoolean(); + this.includeDiskInfo = in.readBoolean(); + } + /** * Create a new allocation explain request. If {@code primary} is false, the first unassigned replica * will be picked for explanation. If no replicas are unassigned, the first assigned replica will @@ -81,6 +92,18 @@ public ClusterAllocationExplainRequest() { this.currentNode = currentNode; } + @Override + public void writeTo(StreamOutput out) throws IOException { + checkVersion(out.getVersion()); + super.writeTo(out); + out.writeOptionalString(index); + out.writeOptionalVInt(shard); + out.writeOptionalBoolean(primary); + out.writeOptionalString(currentNode); + out.writeBoolean(includeYesDecisions); + out.writeBoolean(includeDiskInfo); + } + @Override public ActionRequestValidationException validate() { ActionRequestValidationException validationException = null; @@ -226,26 +249,7 @@ public static ClusterAllocationExplainRequest parse(XContentParser parser) throw @Override public void readFrom(StreamInput in) throws IOException { - checkVersion(in.getVersion()); - super.readFrom(in); - this.index = in.readOptionalString(); - this.shard = in.readOptionalVInt(); - this.primary = in.readOptionalBoolean(); - this.currentNode = in.readOptionalString(); - this.includeYesDecisions = in.readBoolean(); - this.includeDiskInfo = in.readBoolean(); - } - - @Override - public void writeTo(StreamOutput out) throws IOException { - checkVersion(out.getVersion()); - super.writeTo(out); - out.writeOptionalString(index); - out.writeOptionalVInt(shard); - out.writeOptionalBoolean(primary); - out.writeOptionalString(currentNode); - out.writeBoolean(includeYesDecisions); - out.writeBoolean(includeDiskInfo); + throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable"); } private void checkVersion(Version version) { diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/allocation/TransportClusterAllocationExplainAction.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/allocation/TransportClusterAllocationExplainAction.java index 77d4b24d8cc23..bb8bcda2003a2 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/allocation/TransportClusterAllocationExplainAction.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/allocation/TransportClusterAllocationExplainAction.java @@ -66,7 +66,7 @@ public TransportClusterAllocationExplainAction(Settings settings, TransportServi ClusterInfoService clusterInfoService, AllocationDeciders allocationDeciders, ShardsAllocator shardAllocator, GatewayAllocator gatewayAllocator) { super(settings, ClusterAllocationExplainAction.NAME, transportService, clusterService, threadPool, actionFilters, - indexNameExpressionResolver, ClusterAllocationExplainRequest::new); + ClusterAllocationExplainRequest::new, indexNameExpressionResolver); this.clusterInfoService = clusterInfoService; this.allocationDeciders = allocationDeciders; this.shardAllocator = shardAllocator; diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java index ef206d0183b99..fc597a5aa7750 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequest.java @@ -51,6 +51,58 @@ public ClusterHealthRequest(String... indices) { this.indices = indices; } + public ClusterHealthRequest(StreamInput in) throws IOException { + super(in); + int size = in.readVInt(); + if (size == 0) { + indices = Strings.EMPTY_ARRAY; + } else { + indices = new String[size]; + for (int i = 0; i < indices.length; i++) { + indices[i] = in.readString(); + } + } + timeout = new TimeValue(in); + if (in.readBoolean()) { + waitForStatus = ClusterHealthStatus.fromValue(in.readByte()); + } + waitForNoRelocatingShards = in.readBoolean(); + waitForActiveShards = ActiveShardCount.readFrom(in); + waitForNodes = in.readString(); + if (in.readBoolean()) { + waitForEvents = Priority.readFrom(in); + } + } + + @Override + public void writeTo(StreamOutput out) throws IOException { + super.writeTo(out); + if (indices == null) { + out.writeVInt(0); + } else { + out.writeVInt(indices.length); + for (String index : indices) { + out.writeString(index); + } + } + timeout.writeTo(out); + if (waitForStatus == null) { + out.writeBoolean(false); + } else { + out.writeBoolean(true); + out.writeByte(waitForStatus.value()); + } + out.writeBoolean(waitForNoRelocatingShards); + waitForActiveShards.writeTo(out); + out.writeString(waitForNodes); + if (waitForEvents == null) { + out.writeBoolean(false); + } else { + out.writeBoolean(true); + Priority.writeTo(waitForEvents, out); + } + } + @Override public String[] indices() { return indices; @@ -174,54 +226,6 @@ public ActionRequestValidationException validate() { @Override public void readFrom(StreamInput in) throws IOException { - super.readFrom(in); - int size = in.readVInt(); - if (size == 0) { - indices = Strings.EMPTY_ARRAY; - } else { - indices = new String[size]; - for (int i = 0; i < indices.length; i++) { - indices[i] = in.readString(); - } - } - timeout = new TimeValue(in); - if (in.readBoolean()) { - waitForStatus = ClusterHealthStatus.fromValue(in.readByte()); - } - waitForNoRelocatingShards = in.readBoolean(); - waitForActiveShards = ActiveShardCount.readFrom(in); - waitForNodes = in.readString(); - if (in.readBoolean()) { - waitForEvents = Priority.readFrom(in); - } - } - - @Override - public void writeTo(StreamOutput out) throws IOException { - super.writeTo(out); - if (indices == null) { - out.writeVInt(0); - } else { - out.writeVInt(indices.length); - for (String index : indices) { - out.writeString(index); - } - } - timeout.writeTo(out); - if (waitForStatus == null) { - out.writeBoolean(false); - } else { - out.writeBoolean(true); - out.writeByte(waitForStatus.value()); - } - out.writeBoolean(waitForNoRelocatingShards); - waitForActiveShards.writeTo(out); - out.writeString(waitForNodes); - if (waitForEvents == null) { - out.writeBoolean(false); - } else { - out.writeBoolean(true); - Priority.writeTo(waitForEvents, out); - } + throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable"); } } diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java index 8924f81a86cea..6b3ab05a18383 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/health/TransportClusterHealthAction.java @@ -56,7 +56,7 @@ public TransportClusterHealthAction(Settings settings, TransportService transpor ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, GatewayAllocator gatewayAllocator) { super(settings, ClusterHealthAction.NAME, false, transportService, clusterService, threadPool, actionFilters, - indexNameExpressionResolver, ClusterHealthRequest::new); + ClusterHealthRequest::new, indexNameExpressionResolver); this.gatewayAllocator = gatewayAllocator; } diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/remote/RemoteInfoRequest.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/remote/RemoteInfoRequest.java index 6e41f145b65e7..e13c7fc9146a5 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/remote/RemoteInfoRequest.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/remote/RemoteInfoRequest.java @@ -21,9 +21,20 @@ import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestValidationException; +import org.elasticsearch.common.io.stream.StreamInput; + +import java.io.IOException; public final class RemoteInfoRequest extends ActionRequest { + public RemoteInfoRequest() { + + } + + public RemoteInfoRequest(StreamInput in) throws IOException { + super(in); + } + @Override public ActionRequestValidationException validate() { return null; diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/remote/TransportRemoteInfoAction.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/remote/TransportRemoteInfoAction.java index 33254a9aed9ab..0410f920c8a9a 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/remote/TransportRemoteInfoAction.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/remote/TransportRemoteInfoAction.java @@ -38,8 +38,8 @@ public final class TransportRemoteInfoAction extends HandledTransportAction source) { @Override public void readFrom(StreamInput in) throws IOException { - super.readFrom(in); - snapshot = in.readString(); - repository = in.readString(); - indices = in.readStringArray(); - indicesOptions = IndicesOptions.readIndicesOptions(in); - settings = readSettingsFromStream(in); - includeGlobalState = in.readBoolean(); - waitForCompletion = in.readBoolean(); - partial = in.readBoolean(); - } - - @Override - public void writeTo(StreamOutput out) throws IOException { - super.writeTo(out); - out.writeString(snapshot); - out.writeString(repository); - out.writeStringArray(indices); - indicesOptions.writeIndicesOptions(out); - writeSettingsToStream(settings, out); - out.writeBoolean(includeGlobalState); - out.writeBoolean(waitForCompletion); - out.writeBoolean(partial); + throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable"); } @Override diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/TransportCreateSnapshotAction.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/TransportCreateSnapshotAction.java index 269edfc401b7a..52fe03f58c28d 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/TransportCreateSnapshotAction.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/TransportCreateSnapshotAction.java @@ -45,7 +45,7 @@ public class TransportCreateSnapshotAction extends TransportMasterNodeAction source) { @Override public void readFrom(StreamInput in) throws IOException { - super.readFrom(in); - snapshot = in.readString(); - repository = in.readString(); - indices = in.readStringArray(); - indicesOptions = IndicesOptions.readIndicesOptions(in); - renamePattern = in.readOptionalString(); - renameReplacement = in.readOptionalString(); - waitForCompletion = in.readBoolean(); - includeGlobalState = in.readBoolean(); - partial = in.readBoolean(); - includeAliases = in.readBoolean(); - settings = readSettingsFromStream(in); - indexSettings = readSettingsFromStream(in); - ignoreIndexSettings = in.readStringArray(); - } - - @Override - public void writeTo(StreamOutput out) throws IOException { - super.writeTo(out); - out.writeString(snapshot); - out.writeString(repository); - out.writeStringArray(indices); - indicesOptions.writeIndicesOptions(out); - out.writeOptionalString(renamePattern); - out.writeOptionalString(renameReplacement); - out.writeBoolean(waitForCompletion); - out.writeBoolean(includeGlobalState); - out.writeBoolean(partial); - out.writeBoolean(includeAliases); - writeSettingsToStream(settings, out); - writeSettingsToStream(indexSettings, out); - out.writeStringArray(ignoreIndexSettings); + throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable"); } @Override diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/TransportRestoreSnapshotAction.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/TransportRestoreSnapshotAction.java index 5ff5bd17fe5e6..32d4800676295 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/TransportRestoreSnapshotAction.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/TransportRestoreSnapshotAction.java @@ -53,7 +53,7 @@ public class TransportRestoreSnapshotAction extends TransportMasterNodeAction requestReader, IndexNameExpressionResolver indexNameExpressionResolver) { - this(settings, actionName, true, threadPool, transportService, actionFilters, indexNameExpressionResolver, requestReader); + this(settings, actionName, true, threadPool, transportService, actionFilters, requestReader, indexNameExpressionResolver); } protected HandledTransportAction(Settings settings, String actionName, boolean canTripCircuitBreaker, ThreadPool threadPool, @@ -60,7 +60,7 @@ protected HandledTransportAction(Settings settings, String actionName, boolean c protected HandledTransportAction(Settings settings, String actionName, boolean canTripCircuitBreaker, ThreadPool threadPool, TransportService transportService, ActionFilters actionFilters, - IndexNameExpressionResolver indexNameExpressionResolver, Writeable.Reader requestReader) { + Writeable.Reader requestReader, IndexNameExpressionResolver indexNameExpressionResolver) { super(settings, actionName, threadPool, actionFilters, indexNameExpressionResolver, transportService.getTaskManager()); transportService.registerRequestHandler(actionName, ThreadPool.Names.SAME, false, canTripCircuitBreaker, requestReader, new TransportHandler()); diff --git a/core/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadRequest.java b/core/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadRequest.java index 142f3a2fe40a7..890a46b652cf8 100644 --- a/core/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadRequest.java +++ b/core/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadRequest.java @@ -31,14 +31,12 @@ public abstract class MasterNodeReadRequest request, IndexNameExpressionResolver indexNameExpressionResolver) { + this(settings, actionName, true, transportService, clusterService, threadPool, actionFilters, request, indexNameExpressionResolver); + } + protected TransportMasterNodeAction(Settings settings, String actionName, boolean canTripCircuitBreaker, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, - ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, - Supplier request) { + ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Supplier request) { super(settings, actionName, canTripCircuitBreaker, threadPool, transportService, actionFilters, indexNameExpressionResolver, request); this.transportService = transportService; @@ -74,6 +80,17 @@ protected TransportMasterNodeAction(Settings settings, String actionName, boolea this.executor = executor(); } + protected TransportMasterNodeAction(Settings settings, String actionName, boolean canTripCircuitBreaker, + TransportService transportService, ClusterService clusterService, ThreadPool threadPool, + ActionFilters actionFilters, Writeable.Reader request, + IndexNameExpressionResolver indexNameExpressionResolver) { + super(settings, actionName, canTripCircuitBreaker, threadPool, transportService, actionFilters, request, + indexNameExpressionResolver); + this.transportService = transportService; + this.clusterService = clusterService; + this.executor = executor(); + } + protected abstract String executor(); protected abstract Response newResponse(); diff --git a/core/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeReadAction.java b/core/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeReadAction.java index ceb8e1a40ac88..4f36929df2755 100644 --- a/core/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeReadAction.java +++ b/core/src/main/java/org/elasticsearch/action/support/master/TransportMasterNodeReadAction.java @@ -23,6 +23,7 @@ import org.elasticsearch.action.support.ActionFilters; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.cluster.service.ClusterService; +import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.settings.Setting; import org.elasticsearch.common.settings.Setting.Property; import org.elasticsearch.common.settings.Settings; @@ -49,6 +50,12 @@ protected TransportMasterNodeReadAction(Settings settings, String actionName, Tr this(settings, actionName, true, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver,request); } + protected TransportMasterNodeReadAction(Settings settings, String actionName, TransportService transportService, + ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, + Writeable.Reader request, IndexNameExpressionResolver indexNameExpressionResolver) { + this(settings, actionName, true, transportService, clusterService, threadPool, actionFilters, request, indexNameExpressionResolver); + } + protected TransportMasterNodeReadAction(Settings settings, String actionName, boolean checkSizeLimit, TransportService transportService, ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Supplier request) { @@ -57,6 +64,14 @@ protected TransportMasterNodeReadAction(Settings settings, String actionName, bo this.forceLocal = FORCE_LOCAL_SETTING.get(settings); } + protected TransportMasterNodeReadAction(Settings settings, String actionName, boolean checkSizeLimit, TransportService transportService, + ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters, + Writeable.Reader request, IndexNameExpressionResolver indexNameExpressionResolver) { + super(settings, actionName, checkSizeLimit, transportService, clusterService, threadPool, actionFilters, request, + indexNameExpressionResolver); + this.forceLocal = FORCE_LOCAL_SETTING.get(settings); + } + @Override protected final boolean localExecute(Request request) { return forceLocal || request.local(); diff --git a/core/src/test/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainRequestTests.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainRequestTests.java index 0c47caa54665c..c549ab017c1ff 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainRequestTests.java +++ b/core/src/test/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainRequestTests.java @@ -33,8 +33,7 @@ public void testSerialization() throws Exception { BytesStreamOutput output = new BytesStreamOutput(); request.writeTo(output); - ClusterAllocationExplainRequest actual = new ClusterAllocationExplainRequest(); - actual.readFrom(output.bytes().streamInput()); + ClusterAllocationExplainRequest actual = new ClusterAllocationExplainRequest(output.bytes().streamInput()); assertEquals(request.getIndex(), actual.getIndex()); assertEquals(request.getShard(), actual.getShard()); assertEquals(request.isPrimary(), actual.isPrimary()); diff --git a/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java b/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java index bf2ffc5236e3f..a863d67231ad0 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java +++ b/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java @@ -28,6 +28,7 @@ import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ShardOperationFailedException; +import org.elasticsearch.action.admin.cluster.allocation.ClusterAllocationExplainRequest; import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequestBuilder; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.indices.alias.exists.AliasesExistResponse; @@ -693,6 +694,9 @@ public static void assertVersionSerializable(Version version, Streamable streama // and the readFrom method throws an exception if called Streamable newInstanceFromStream = tryCreateFromStream(streamable, input); if (newInstanceFromStream == null) { + if (newInstance instanceof ClusterAllocationExplainRequest) { + System.out.println("what?"); + } newInstance.readFrom(input); } assertThat("Stream should be fully read with version [" + version + "] for streamable [" + streamable + "]", input.available(), From 6db927efbd1a4f93e88cbf0212179127fc7e6e53 Mon Sep 17 00:00:00 2001 From: Tal Levy Date: Fri, 1 Sep 2017 10:54:19 -0700 Subject: [PATCH 2/2] remove leftover debug print statement --- .../elasticsearch/test/hamcrest/ElasticsearchAssertions.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java b/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java index a863d67231ad0..bf2ffc5236e3f 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java +++ b/test/framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java @@ -28,7 +28,6 @@ import org.elasticsearch.action.ActionRequest; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ShardOperationFailedException; -import org.elasticsearch.action.admin.cluster.allocation.ClusterAllocationExplainRequest; import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequestBuilder; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.indices.alias.exists.AliasesExistResponse; @@ -694,9 +693,6 @@ public static void assertVersionSerializable(Version version, Streamable streama // and the readFrom method throws an exception if called Streamable newInstanceFromStream = tryCreateFromStream(streamable, input); if (newInstanceFromStream == null) { - if (newInstance instanceof ClusterAllocationExplainRequest) { - System.out.println("what?"); - } newInstance.readFrom(input); } assertThat("Stream should be fully read with version [" + version + "] for streamable [" + streamable + "]", input.available(),