Skip to content

Commit 1a58e69

Browse files
committed
[ML] Replace Version.CURRENT in streaming functions (#36118)
1 parent 4e98158 commit 1a58e69

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/OpenJobAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public JobParams(StreamInput in) throws IOException {
182182
in.readBoolean();
183183
}
184184
timeout = TimeValue.timeValueMillis(in.readVLong());
185-
if (in.getVersion().onOrAfter(Version.CURRENT)) {
185+
if (in.getVersion().onOrAfter(Version.V_6_6_0)) {
186186
job = in.readOptionalWriteable(Job::new);
187187
}
188188
}
@@ -225,7 +225,7 @@ public void writeTo(StreamOutput out) throws IOException {
225225
out.writeBoolean(true);
226226
}
227227
out.writeVLong(timeout.millis());
228-
if (out.getVersion().onOrAfter(Version.CURRENT)) {
228+
if (out.getVersion().onOrAfter(Version.V_6_6_0)) {
229229
out.writeOptionalWriteable(job);
230230
}
231231
}

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/StartDatafeedAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public DatafeedParams(StreamInput in) throws IOException {
201201
startTime = in.readVLong();
202202
endTime = in.readOptionalLong();
203203
timeout = TimeValue.timeValueMillis(in.readVLong());
204-
if (in.getVersion().onOrAfter(Version.CURRENT)) {
204+
if (in.getVersion().onOrAfter(Version.V_6_6_0)) {
205205
jobId = in.readOptionalString();
206206
datafeedIndices = in.readList(StreamInput::readString);
207207
}
@@ -278,7 +278,7 @@ public void writeTo(StreamOutput out) throws IOException {
278278
out.writeVLong(startTime);
279279
out.writeOptionalLong(endTime);
280280
out.writeVLong(timeout.millis());
281-
if (out.getVersion().onOrAfter(Version.CURRENT)) {
281+
if (out.getVersion().onOrAfter(Version.V_6_6_0)) {
282282
out.writeOptionalString(jobId);
283283
out.writeStringList(datafeedIndices);
284284
}

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/JobUpdate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public JobUpdate(StreamInput in) throws IOException {
141141
} else {
142142
jobVersion = null;
143143
}
144-
if (in.getVersion().onOrAfter(Version.CURRENT)) {
144+
if (in.getVersion().onOrAfter(Version.V_6_6_0)) {
145145
clearJobFinishTime = in.readOptionalBoolean();
146146
} else {
147147
clearJobFinishTime = null;
@@ -183,7 +183,7 @@ public void writeTo(StreamOutput out) throws IOException {
183183
out.writeBoolean(false);
184184
}
185185
}
186-
if (out.getVersion().onOrAfter(Version.CURRENT)) {
186+
if (out.getVersion().onOrAfter(Version.V_6_6_0)) {
187187
out.writeOptionalBoolean(clearJobFinishTime);
188188
}
189189
}

0 commit comments

Comments
 (0)