@@ -42,13 +42,13 @@ public LTRStatsRequestBuilder(ElasticsearchClient client) {
42
42
public static class LTRStatsNodeRequest extends TransportRequest {
43
43
private final LTRStatsNodesRequest nodesRequest ;
44
44
45
- public LTRStatsNodeRequest (LTRStatsNodesRequest nodesRequest ) {
46
- this .nodesRequest = nodesRequest ;
47
- }
48
-
49
45
public LTRStatsNodeRequest (StreamInput in ) throws IOException {
50
46
super (in );
51
- nodesRequest = new LTRStatsNodesRequest (in );
47
+ this .nodesRequest = new LTRStatsNodesRequest (in );
48
+ }
49
+
50
+ public LTRStatsNodeRequest (LTRStatsNodesRequest nodesRequest ) {
51
+ this .nodesRequest = nodesRequest ;
52
52
}
53
53
54
54
public LTRStatsNodesRequest getLTRStatsNodesRequest () {
@@ -58,7 +58,7 @@ public LTRStatsNodesRequest getLTRStatsNodesRequest() {
58
58
@ Override
59
59
public void writeTo (StreamOutput out ) throws IOException {
60
60
super .writeTo (out );
61
- nodesRequest .writeTo (out );
61
+ nodesRequest .writeToStream (out );
62
62
}
63
63
}
64
64
@@ -102,7 +102,7 @@ public static class LTRStatsNodesRequest extends BaseNodesRequest<LTRStatsNodesR
102
102
private Set <String > statsToBeRetrieved ;
103
103
104
104
public LTRStatsNodesRequest (StreamInput in ) throws IOException {
105
- super (in );
105
+ super (( String []) null );
106
106
statsToBeRetrieved = in .readCollectionAsSet (StreamInput ::readString );
107
107
}
108
108
@@ -119,9 +119,7 @@ public Set<String> getStatsToBeRetrieved() {
119
119
return statsToBeRetrieved ;
120
120
}
121
121
122
- @ Override
123
- public void writeTo (StreamOutput out ) throws IOException {
124
- super .writeTo (out );
122
+ public void writeToStream (StreamOutput out ) throws IOException {
125
123
out .writeStringCollection (statsToBeRetrieved );
126
124
}
127
125
}
0 commit comments