File tree 5 files changed +15
-17
lines changed
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml
5 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ public JobParams(String jobId) {
174
174
public JobParams (StreamInput in ) throws IOException {
175
175
jobId = in .readString ();
176
176
timeout = TimeValue .timeValueMillis (in .readVLong ());
177
- if (in .getVersion ().onOrAfter (Version .CURRENT )) {
177
+ if (in .getVersion ().onOrAfter (Version .V_6_6_0 )) {
178
178
job = in .readOptionalWriteable (Job ::new );
179
179
}
180
180
}
@@ -213,7 +213,7 @@ public String getWriteableName() {
213
213
public void writeTo (StreamOutput out ) throws IOException {
214
214
out .writeString (jobId );
215
215
out .writeVLong (timeout .millis ());
216
- if (out .getVersion ().onOrAfter (Version .CURRENT )) {
216
+ if (out .getVersion ().onOrAfter (Version .V_6_6_0 )) {
217
217
out .writeOptionalWriteable (job );
218
218
}
219
219
}
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ public DatafeedParams(StreamInput in) throws IOException {
195
195
startTime = in .readVLong ();
196
196
endTime = in .readOptionalLong ();
197
197
timeout = TimeValue .timeValueMillis (in .readVLong ());
198
- if (in .getVersion ().onOrAfter (Version .CURRENT )) {
198
+ if (in .getVersion ().onOrAfter (Version .V_6_6_0 )) {
199
199
jobId = in .readOptionalString ();
200
200
datafeedIndices = in .readList (StreamInput ::readString );
201
201
}
@@ -272,7 +272,7 @@ public void writeTo(StreamOutput out) throws IOException {
272
272
out .writeVLong (startTime );
273
273
out .writeOptionalLong (endTime );
274
274
out .writeVLong (timeout .millis ());
275
- if (out .getVersion ().onOrAfter (Version .CURRENT )) {
275
+ if (out .getVersion ().onOrAfter (Version .V_6_6_0 )) {
276
276
out .writeOptionalString (jobId );
277
277
out .writeStringList (datafeedIndices );
278
278
}
Original file line number Diff line number Diff line change @@ -97,8 +97,7 @@ public void readFrom(StreamInput in) throws IOException {
97
97
} else {
98
98
isInternal = false ;
99
99
}
100
- // TODO jindex change CURRENT to specific version when feature branch is merged
101
- if (in .getVersion ().onOrAfter (Version .V_6_3_0 ) && in .getVersion ().before (Version .CURRENT )) {
100
+ if (in .getVersion ().onOrAfter (Version .V_6_3_0 ) && in .getVersion ().before (Version .V_7_0_0 )) {
102
101
in .readBoolean (); // was waitForAck
103
102
}
104
103
}
@@ -111,8 +110,7 @@ public void writeTo(StreamOutput out) throws IOException {
111
110
if (out .getVersion ().onOrAfter (Version .V_6_2_2 )) {
112
111
out .writeBoolean (isInternal );
113
112
}
114
- // TODO jindex change CURRENT to specific version when feature branch is merged
115
- if (out .getVersion ().onOrAfter (Version .V_6_3_0 ) && out .getVersion ().before (Version .CURRENT )) {
113
+ if (out .getVersion ().onOrAfter (Version .V_6_3_0 ) && out .getVersion ().before (Version .V_7_0_0 )) {
116
114
out .writeBoolean (false ); // was waitForAck
117
115
}
118
116
}
Original file line number Diff line number Diff line change @@ -809,7 +809,7 @@ public Builder setModelSnapshotMinVersion(Version modelSnapshotMinVersion) {
809
809
return this ;
810
810
}
811
811
812
- public Builder setModelSnapshotMinVersion (String modelSnapshotMinVersion ) {
812
+ Builder setModelSnapshotMinVersion (String modelSnapshotMinVersion ) {
813
813
this .modelSnapshotMinVersion = Version .fromString (modelSnapshotMinVersion );
814
814
return this ;
815
815
}
Original file line number Diff line number Diff line change @@ -140,16 +140,16 @@ public JobUpdate(StreamInput in) throws IOException {
140
140
} else {
141
141
jobVersion = null ;
142
142
}
143
+ if (in .getVersion ().onOrAfter (Version .V_6_6_0 )) {
144
+ clearJobFinishTime = in .readOptionalBoolean ();
145
+ } else {
146
+ clearJobFinishTime = null ;
147
+ }
143
148
if (in .getVersion ().onOrAfter (Version .V_7_0_0 ) && in .readBoolean ()) {
144
149
modelSnapshotMinVersion = Version .readVersion (in );
145
150
} else {
146
151
modelSnapshotMinVersion = null ;
147
152
}
148
- if (in .getVersion ().onOrAfter (Version .CURRENT )) { // NORELEASE change current to Jindex release version
149
- clearJobFinishTime = in .readOptionalBoolean ();
150
- } else {
151
- clearJobFinishTime = null ;
152
- }
153
153
}
154
154
155
155
@ Override
@@ -188,6 +188,9 @@ public void writeTo(StreamOutput out) throws IOException {
188
188
out .writeBoolean (false );
189
189
}
190
190
}
191
+ if (out .getVersion ().onOrAfter (Version .V_6_6_0 )) {
192
+ out .writeOptionalBoolean (clearJobFinishTime );
193
+ }
191
194
if (out .getVersion ().onOrAfter (Version .V_7_0_0 )) {
192
195
if (modelSnapshotMinVersion != null ) {
193
196
out .writeBoolean (true );
@@ -196,9 +199,6 @@ public void writeTo(StreamOutput out) throws IOException {
196
199
out .writeBoolean (false );
197
200
}
198
201
}
199
- if (out .getVersion ().onOrAfter (Version .CURRENT )) { // NORELEASE change current to Jindex release version
200
- out .writeOptionalBoolean (clearJobFinishTime );
201
- }
202
202
}
203
203
204
204
public String getJobId () {
You can’t perform that action at this time.
0 commit comments