Adapt bwc versions after backporting #31045 to 6.x
This commit is contained in:
parent
146965f3ec
commit
ccb78c2fdf
|
@ -313,7 +313,7 @@ public final class PersistentTasksCustomMetaData extends AbstractNamedDiffable<M
|
|||
id = in.readString();
|
||||
allocationId = in.readLong();
|
||||
taskName = in.readString();
|
||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
||||
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||
params = (P) in.readNamedWriteable(PersistentTaskParams.class);
|
||||
} else {
|
||||
params = (P) in.readOptionalNamedWriteable(PersistentTaskParams.class);
|
||||
|
@ -328,7 +328,7 @@ public final class PersistentTasksCustomMetaData extends AbstractNamedDiffable<M
|
|||
out.writeString(id);
|
||||
out.writeLong(allocationId);
|
||||
out.writeString(taskName);
|
||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
||||
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||
out.writeNamedWriteable(params);
|
||||
} else {
|
||||
out.writeOptionalNamedWriteable(params);
|
||||
|
|
|
@ -86,7 +86,7 @@ public class StartPersistentTaskAction extends Action<StartPersistentTaskAction.
|
|||
super.readFrom(in);
|
||||
taskId = in.readString();
|
||||
taskName = in.readString();
|
||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
||||
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||
params = in.readNamedWriteable(PersistentTaskParams.class);
|
||||
} else {
|
||||
params = in.readOptionalNamedWriteable(PersistentTaskParams.class);
|
||||
|
@ -98,7 +98,7 @@ public class StartPersistentTaskAction extends Action<StartPersistentTaskAction.
|
|||
super.writeTo(out);
|
||||
out.writeString(taskId);
|
||||
out.writeString(taskName);
|
||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
||||
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||
out.writeNamedWriteable(params);
|
||||
} else {
|
||||
out.writeOptionalNamedWriteable(params);
|
||||
|
|
|
@ -33,7 +33,6 @@ import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
|||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||
import org.elasticsearch.common.xcontent.XContentParser;
|
||||
|
@ -43,7 +42,6 @@ import org.elasticsearch.plugins.Plugin;
|
|||
import org.elasticsearch.script.ScriptService;
|
||||
import org.elasticsearch.test.ESIntegTestCase;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TcpTransport;
|
||||
import org.elasticsearch.watcher.ResourceWatcherService;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
Loading…
Reference in New Issue