Skip to content

Commit

Permalink
Remove deprecated CLusterState.Builder methods
Browse files Browse the repository at this point in the history
  • Loading branch information
williamrandolph committed Nov 16, 2023
1 parent e03b0a5 commit 56c22b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
10 changes: 0 additions & 10 deletions server/src/main/java/org/elasticsearch/cluster/ClusterState.java
Original file line number Diff line number Diff line change
Expand Up @@ -818,12 +818,6 @@ public DiscoveryNodes nodes() {
return nodes;
}

// Deprecate to keep downstream projects compiling
@Deprecated(forRemoval = true)
public Builder putTransportVersion(String nodeId, TransportVersion transportVersion) {
return putCompatibilityVersions(nodeId, transportVersion, Map.of());
}

public Builder putCompatibilityVersions(
String nodeId,
TransportVersion transportVersion,
Expand All @@ -841,10 +835,6 @@ public Builder putCompatibilityVersions(String nodeId, CompatibilityVersions ver
}

// Deprecate to keep downstream projects compiling
@Deprecated(forRemoval = true)
public Builder compatibilityVersions(Map<String, CompatibilityVersions> versions) {
return nodeIdsToCompatibilityVersions(versions);
}

public Builder nodeIdsToCompatibilityVersions(Map<String, CompatibilityVersions> versions) {
versions.forEach((key, value) -> Objects.requireNonNull(value, key));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class TransportCreateIndexActionTests extends ESTestCase {
)
.build()
)
.compatibilityVersions(
.nodeIdsToCompatibilityVersions(
Map.of(
"node-1",
new CompatibilityVersions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ public void testHasMixedSystemIndexVersions() throws IOException {
// equal mappings versions
{
var builder = ClusterState.builder(buildClusterState());
builder.compatibilityVersions(
builder.nodeIdsToCompatibilityVersions(
Map.of(
"node1",
new CompatibilityVersions(
Expand All @@ -1268,7 +1268,7 @@ public void testHasMixedSystemIndexVersions() throws IOException {
// unequal mappings versions
{
var builder = ClusterState.builder(buildClusterState());
builder.compatibilityVersions(
builder.nodeIdsToCompatibilityVersions(
Map.of(
"node1",
new CompatibilityVersions(
Expand All @@ -1288,7 +1288,7 @@ public void testHasMixedSystemIndexVersions() throws IOException {
// one node has a mappings version that the other is missing
{
var builder = ClusterState.builder(buildClusterState());
builder.compatibilityVersions(
builder.nodeIdsToCompatibilityVersions(
Map.of(
"node1",
new CompatibilityVersions(
Expand Down

0 comments on commit 56c22b5

Please sign in to comment.