Skip to content

Commit

Permalink
Remove MasterService class (opensearch-project#17151)
Browse files Browse the repository at this point in the history
This has been deprecated and is replaced by ClusterManagerService.

Signed-off-by: Andrew Ross <[email protected]>
  • Loading branch information
andrross authored Jan 28, 2025
1 parent 8ec93ae commit 32a88eb
Show file tree
Hide file tree
Showing 16 changed files with 1,087 additions and 1,396 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void onFailure(Exception e) {

assertEquals(totalRequest + throttledRequest.get(), requestCountOnClusterManager.get());
assertBusy(
() -> { assertEquals(clusterService().getMasterService().numberOfThrottledPendingTasks(), throttledRequest.get()); }
() -> { assertEquals(clusterService().getClusterManagerService().numberOfThrottledPendingTasks(), throttledRequest.get()); }
);
} finally {
clusterSettingCleanUp();
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import org.opensearch.cluster.ClusterStateTaskExecutor;
import org.opensearch.cluster.ClusterStateTaskListener;
import org.opensearch.cluster.LocalNodeClusterManagerListener;
import org.opensearch.cluster.LocalNodeMasterListener;
import org.opensearch.cluster.NodeConnectionsService;
import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.routing.OperationRouting;
Expand Down Expand Up @@ -247,25 +246,10 @@ public void addLocalNodeClusterManagerListener(LocalNodeClusterManagerListener l
clusterApplierService.addLocalNodeClusterManagerListener(listener);
}

/**
* Add a listener for on/off local node cluster-manager events
* @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #addLocalNodeClusterManagerListener}
*/
@Deprecated
public void addLocalNodeMasterListener(LocalNodeMasterListener listener) {
addLocalNodeClusterManagerListener(listener);
}

public ClusterManagerService getClusterManagerService() {
return clusterManagerService;
}

/** @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #getClusterManagerService()} */
@Deprecated
public MasterService getMasterService() {
return clusterManagerService;
}

/**
* Getter and Setter for IndexingPressureService, This method exposes IndexingPressureService stats to other plugins for usage.
* Although Indexing Pressure instances can be accessed via Node and NodeService class but none of them are
Expand All @@ -291,12 +275,6 @@ public static boolean assertClusterOrClusterManagerStateThread() {
return true;
}

/** @deprecated As of 2.2, because supporting inclusive language, replaced by {@link #assertClusterOrClusterManagerStateThread} */
@Deprecated
public static boolean assertClusterOrMasterStateThread() {
return assertClusterOrClusterManagerStateThread();
}

public ClusterName getClusterName() {
return clusterName;
}
Expand Down
Loading

0 comments on commit 32a88eb

Please sign in to comment.