-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Persistent Tasks implementations version and feature aware #31045
Changes from all commits
e1fbfaf
82ed4d4
6d529fe
66f2ea9
25a861c
0b39ce9
26071ff
8be176c
1f66829
4b87ed8
aeee8ff
18a9a6f
35463b3
dbc5076
1a31b99
e6e5413
5e6de98
e481804
ce99bbe
1f83926
5bc8a0a
9870fdd
7b82a5b
2aa7a85
ef015fa
307b714
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
|
||
package org.elasticsearch.cluster.metadata; | ||
|
||
import org.elasticsearch.Version; | ||
import org.elasticsearch.cluster.Diff; | ||
import org.elasticsearch.cluster.NamedDiff; | ||
import org.elasticsearch.common.ParseField; | ||
|
@@ -34,8 +35,6 @@ | |
import org.elasticsearch.common.xcontent.XContentBuilder; | ||
import org.elasticsearch.common.xcontent.XContentParser; | ||
import org.elasticsearch.index.Index; | ||
import org.joda.time.DateTime; | ||
import org.joda.time.DateTimeZone; | ||
|
||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
|
@@ -44,7 +43,6 @@ | |
import java.util.EnumSet; | ||
import java.util.List; | ||
import java.util.Objects; | ||
import java.util.concurrent.TimeUnit; | ||
|
||
/** | ||
* A collection of tombstones for explicitly marking indices as deleted in the cluster state. | ||
|
@@ -97,6 +95,11 @@ public String getWriteableName() { | |
return TYPE; | ||
} | ||
|
||
@Override | ||
public Version getMinimalSupportedVersion() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See my comment about littering. |
||
return Version.CURRENT.minimumCompatibilityVersion(); | ||
} | ||
|
||
@Override | ||
public EnumSet<MetaData.XContentContext> context() { | ||
return MetaData.API_AND_GATEWAY; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
package org.elasticsearch.cluster.metadata; | ||
|
||
import org.elasticsearch.ElasticsearchParseException; | ||
import org.elasticsearch.Version; | ||
import org.elasticsearch.cluster.AbstractNamedDiffable; | ||
import org.elasticsearch.cluster.NamedDiff; | ||
import org.elasticsearch.cluster.metadata.MetaData.Custom; | ||
|
@@ -103,6 +104,11 @@ public String getWriteableName() { | |
return TYPE; | ||
} | ||
|
||
@Override | ||
public Version getMinimalSupportedVersion() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See my comment about littering. |
||
return Version.CURRENT.minimumCompatibilityVersion(); | ||
} | ||
|
||
public RepositoriesMetaData(StreamInput in) throws IOException { | ||
RepositoryMetaData[] repository = new RepositoryMetaData[in.readVInt()]; | ||
for (int i = 0; i < repository.length; i++) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Licensed to Elasticsearch under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.elasticsearch.common.io.stream; | ||
|
||
import org.elasticsearch.Version; | ||
|
||
/** | ||
* A {@link NamedWriteable} that has a minimum version associated with it. | ||
*/ | ||
public interface VersionedNamedWriteable extends NamedWriteable { | ||
|
||
/** | ||
* Returns the name of the writeable object | ||
*/ | ||
String getWriteableName(); | ||
|
||
/** | ||
* The minimal version of the recipient this object can be sent to | ||
*/ | ||
Version getMinimalSupportedVersion(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
|
||
package org.elasticsearch.ingest; | ||
|
||
import org.elasticsearch.Version; | ||
import org.elasticsearch.cluster.Diff; | ||
import org.elasticsearch.cluster.DiffableUtils; | ||
import org.elasticsearch.cluster.NamedDiff; | ||
|
@@ -69,6 +70,11 @@ public String getWriteableName() { | |
return TYPE; | ||
} | ||
|
||
@Override | ||
public Version getMinimalSupportedVersion() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See my comment about littering. |
||
return Version.CURRENT.minimumCompatibilityVersion(); | ||
} | ||
|
||
public Map<String, PipelineConfiguration> getPipelines() { | ||
return pipelines; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment about littering.