Skip to content

Commit 347af71

Browse files
committed
Remove serialization code
1 parent 3726560 commit 347af71

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequest.java

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@
99

1010
package org.elasticsearch.action.admin.cluster.state;
1111

12-
import org.elasticsearch.TransportVersions;
1312
import org.elasticsearch.action.ActionRequestValidationException;
1413
import org.elasticsearch.action.IndicesRequest;
1514
import org.elasticsearch.action.support.IndicesOptions;
1615
import org.elasticsearch.action.support.local.LocalClusterStateRequest;
1716
import org.elasticsearch.common.Strings;
1817
import org.elasticsearch.common.io.stream.StreamInput;
19-
import org.elasticsearch.common.io.stream.StreamOutput;
2018
import org.elasticsearch.core.TimeValue;
2119
import org.elasticsearch.tasks.CancellableTask;
2220
import org.elasticsearch.tasks.Task;
@@ -47,7 +45,7 @@ public ClusterStateRequest(TimeValue masterNodeTimeout) {
4745
/**
4846
* Even though this request is only executed on the local node, we still need to be able to serialize it for cross-cluster requests.
4947
*/
50-
public ClusterStateRequest(StreamInput in) throws IOException {
48+
ClusterStateRequest(StreamInput in) throws IOException {
5149
super(in);
5250
routingTable = in.readBoolean();
5351
nodes = in.readBoolean();
@@ -60,25 +58,6 @@ public ClusterStateRequest(StreamInput in) throws IOException {
6058
waitForMetadataVersion = in.readOptionalLong();
6159
}
6260

63-
@Override
64-
public void writeTo(StreamOutput out) throws IOException {
65-
getParentTask().writeTo(out);
66-
out.writeTimeValue(masterTimeout());
67-
if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_15_0)) {
68-
out.writeVLong(0L); // Master term
69-
} // else no protection against routing loops in older versions
70-
out.writeBoolean(true); // Local
71-
out.writeBoolean(routingTable);
72-
out.writeBoolean(nodes);
73-
out.writeBoolean(metadata);
74-
out.writeBoolean(blocks);
75-
out.writeBoolean(customs);
76-
out.writeStringArray(indices);
77-
indicesOptions.writeIndicesOptions(out);
78-
out.writeTimeValue(waitForTimeout);
79-
out.writeOptionalLong(waitForMetadataVersion);
80-
}
81-
8261
@Override
8362
public ActionRequestValidationException validate() {
8463
return null;

server/src/main/java/org/elasticsearch/action/support/local/LocalClusterStateRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected LocalClusterStateRequest(StreamInput in, boolean readLocal) throws IOE
6464
}
6565

6666
@Override
67-
public void writeTo(StreamOutput out) throws IOException {
67+
public final void writeTo(StreamOutput out) throws IOException {
6868
TransportAction.localOnly();
6969
}
7070

0 commit comments

Comments
 (0)