[ML] Model snapshot min_version is now present since 7.0.0

Original commit: elastic/x-pack-elasticsearch@39d193461d
This commit is contained in:
Dimitris Athanasiou 2018-03-26 17:08:06 +01:00
parent a600350d4c
commit afb6a06f61

View File

@ -133,7 +133,7 @@ public class ModelSnapshot implements ToXContentObject, Writeable {
public ModelSnapshot(StreamInput in) throws IOException {
jobId = in.readString();
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
minVersion = Version.readVersion(in);
} else {
minVersion = Version.V_5_5_0;
@ -152,7 +152,7 @@ public class ModelSnapshot implements ToXContentObject, Writeable {
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeString(jobId);
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
Version.writeVersion(minVersion, out);
}
if (timestamp != null) {