Skip to content
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

Deprecate and Rename abstract methods from 'Master' terminology to 'ClusterManager'. #4032

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void testVerifyRepositoryWithBlocks() {
.prepareVerifyRepository("test-repo-blocks")
.execute()
.actionGet();
assertThat(response.getNodes().size(), equalTo(cluster().numDataAndMasterNodes()));
assertThat(response.getNodes().size(), equalTo(cluster().numDataAndClusterManagerNodes()));
} finally {
setClusterReadOnly(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected void setUpRepository() throws Exception {

logger.info("--> verify the repository");
VerifyRepositoryResponse verifyResponse = client().admin().cluster().prepareVerifyRepository(REPOSITORY_NAME).get();
assertThat(verifyResponse.getNodes().size(), equalTo(cluster().numDataAndMasterNodes()));
assertThat(verifyResponse.getNodes().size(), equalTo(cluster().numDataAndClusterManagerNodes()));

logger.info("--> create a snapshot");
CreateSnapshotResponse snapshotResponse = client().admin()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class BlobStoreRepositoryCleanupIT extends AbstractSnapshotIntegTestCase
public void testClusterManagerFailoverDuringCleanup() throws Exception {
startBlockedCleanup("test-repo");

final int nodeCount = internalCluster().numDataAndMasterNodes();
final int nodeCount = internalCluster().numDataAndClusterManagerNodes();
logger.info("--> stopping cluster-manager node");
internalCluster().stopCurrentClusterManagerNode();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void testRepositoryCreation() throws Exception {
logger.info("--> verify the repository");
int numberOfFiles = FileSystemUtils.files(location).length;
VerifyRepositoryResponse verifyRepositoryResponse = client.admin().cluster().prepareVerifyRepository("test-repo-1").get();
assertThat(verifyRepositoryResponse.getNodes().size(), equalTo(cluster().numDataAndMasterNodes()));
assertThat(verifyRepositoryResponse.getNodes().size(), equalTo(cluster().numDataAndClusterManagerNodes()));

logger.info("--> verify that we didn't leave any files as a result of verification");
assertThat(FileSystemUtils.files(location).length, equalTo(numberOfFiles));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected ClusterBlockException checkBlock(ClusterAllocationExplainRequest reque
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final ClusterAllocationExplainRequest request,
final ClusterState state,
final ActionListener<ClusterAllocationExplainResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ protected AddVotingConfigExclusionsResponse read(StreamInput in) throws IOExcept
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
AddVotingConfigExclusionsRequest request,
ClusterState state,
ActionListener<AddVotingConfigExclusionsResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected ClearVotingConfigExclusionsResponse read(StreamInput in) throws IOExce
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
ClearVotingConfigExclusionsRequest request,
ClusterState initialState,
ActionListener<ClearVotingConfigExclusionsResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,17 @@ protected ClusterBlockException checkBlock(ClusterHealthRequest request, Cluster
}

@Override
protected final void masterOperation(ClusterHealthRequest request, ClusterState state, ActionListener<ClusterHealthResponse> listener)
throws Exception {
protected final void clusterManagerOperation(
ClusterHealthRequest request,
ClusterState state,
ActionListener<ClusterHealthResponse> listener
) throws Exception {
logger.warn("attempt to execute a cluster health operation without a task");
throw new UnsupportedOperationException("task parameter is required for this operation");
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final Task task,
final ClusterHealthRequest request,
final ClusterState unusedState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ protected CleanupRepositoryResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
CleanupRepositoryRequest request,
ClusterState state,
ActionListener<CleanupRepositoryResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected ClusterBlockException checkBlock(DeleteRepositoryRequest request, Clus
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final DeleteRepositoryRequest request,
ClusterState state,
final ActionListener<AcknowledgedResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected ClusterBlockException checkBlock(GetRepositoriesRequest request, Clust
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final GetRepositoriesRequest request,
ClusterState state,
final ActionListener<GetRepositoriesResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected ClusterBlockException checkBlock(PutRepositoryRequest request, Cluster
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final PutRepositoryRequest request,
ClusterState state,
final ActionListener<AcknowledgedResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected ClusterBlockException checkBlock(VerifyRepositoryRequest request, Clus
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final VerifyRepositoryRequest request,
ClusterState state,
final ActionListener<VerifyRepositoryResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected ClusterRerouteResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final ClusterRerouteRequest request,
final ClusterState state,
final ActionListener<ClusterRerouteResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ protected ClusterUpdateSettingsResponse read(StreamInput in) throws IOException
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final ClusterUpdateSettingsRequest request,
final ClusterState state,
final ActionListener<ClusterUpdateSettingsResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected ClusterSearchShardsResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final ClusterSearchShardsRequest request,
final ClusterState state,
final ActionListener<ClusterSearchShardsResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ protected AcknowledgedResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(CloneSnapshotRequest request, ClusterState state, ActionListener<AcknowledgedResponse> listener) {
protected void clusterManagerOperation(
CloneSnapshotRequest request,
ClusterState state,
ActionListener<AcknowledgedResponse> listener
) {
snapshotsService.cloneSnapshot(request, ActionListener.map(listener, v -> new AcknowledgedResponse(true)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected ClusterBlockException checkBlock(CreateSnapshotRequest request, Cluste
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final CreateSnapshotRequest request,
ClusterState state,
final ActionListener<CreateSnapshotResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected ClusterBlockException checkBlock(DeleteSnapshotRequest request, Cluste
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final DeleteSnapshotRequest request,
ClusterState state,
final ActionListener<AcknowledgedResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected ClusterBlockException checkBlock(GetSnapshotsRequest request, ClusterS
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final GetSnapshotsRequest request,
final ClusterState state,
final ActionListener<GetSnapshotsResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected ClusterBlockException checkBlock(RestoreSnapshotRequest request, Clust
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final RestoreSnapshotRequest request,
final ClusterState state,
final ActionListener<RestoreSnapshotResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ protected SnapshotsStatusResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final SnapshotsStatusRequest request,
final ClusterState state,
final ActionListener<SnapshotsStatusResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ protected ClusterBlockException checkBlock(ClusterStateRequest request, ClusterS
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final ClusterStateRequest request,
final ClusterState state,
final ActionListener<ClusterStateResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ protected AcknowledgedResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(DeleteStoredScriptRequest request, ClusterState state, ActionListener<AcknowledgedResponse> listener)
throws Exception {
protected void clusterManagerOperation(
DeleteStoredScriptRequest request,
ClusterState state,
ActionListener<AcknowledgedResponse> listener
) throws Exception {
scriptService.deleteStoredScript(clusterService, request, listener);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ protected GetStoredScriptResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(GetStoredScriptRequest request, ClusterState state, ActionListener<GetStoredScriptResponse> listener)
throws Exception {
protected void clusterManagerOperation(
GetStoredScriptRequest request,
ClusterState state,
ActionListener<GetStoredScriptResponse> listener
) throws Exception {
listener.onResponse(new GetStoredScriptResponse(request.id(), scriptService.getStoredScript(state, request)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ protected AcknowledgedResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(PutStoredScriptRequest request, ClusterState state, ActionListener<AcknowledgedResponse> listener)
throws Exception {
protected void clusterManagerOperation(
PutStoredScriptRequest request,
ClusterState state,
ActionListener<AcknowledgedResponse> listener
) throws Exception {
scriptService.putStoredScript(clusterService, request, listener);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ protected ClusterBlockException checkBlock(PendingClusterTasksRequest request, C
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
PendingClusterTasksRequest request,
ClusterState state,
ActionListener<PendingClusterTasksResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ protected ClusterBlockException checkBlock(IndicesAliasesRequest request, Cluste
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final IndicesAliasesRequest request,
final ClusterState state,
final ActionListener<AcknowledgedResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected GetAliasesResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(GetAliasesRequest request, ClusterState state, ActionListener<GetAliasesResponse> listener) {
protected void clusterManagerOperation(GetAliasesRequest request, ClusterState state, ActionListener<GetAliasesResponse> listener) {
String[] concreteIndices;
// Switch to a context which will drop any deprecation warnings, because there may be indices resolved here which are not
// returned in the final response. We'll add warnings back later if necessary in checkSystemIndexAccess.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ protected ClusterBlockException checkBlock(CloseIndexRequest request, ClusterSta
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final CloseIndexRequest request,
final ClusterState state,
final ActionListener<CloseIndexResponse> listener
Expand All @@ -149,7 +149,7 @@ protected void masterOperation(
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final Task task,
final CloseIndexRequest request,
final ClusterState state,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ protected CreateIndexResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(CreateIndexRequest request, ClusterState state, ActionListener<CreateIndexResponse> finalListener) {
protected void clusterManagerOperation(
CreateIndexRequest request,
ClusterState state,
ActionListener<CreateIndexResponse> finalListener
) {
AtomicReference<String> indexNameRef = new AtomicReference<>();
ActionListener<ClusterStateUpdateResponse> listener = ActionListener.wrap(response -> {
String indexName = indexNameRef.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected ClusterBlockException checkBlock(CreateIndexRequest request, ClusterSt
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final CreateIndexRequest request,
final ClusterState state,
final ActionListener<CreateIndexResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ protected AcknowledgedResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
DeleteDanglingIndexRequest deleteRequest,
ClusterState state,
ActionListener<AcknowledgedResponse> deleteListener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ protected AcknowledgedResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(Request request, ClusterState state, ActionListener<AcknowledgedResponse> listener)
protected void clusterManagerOperation(Request request, ClusterState state, ActionListener<AcknowledgedResponse> listener)
throws Exception {
CreateDataStreamClusterStateUpdateRequest updateRequest = new CreateDataStreamClusterStateUpdateRequest(
request.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ protected AcknowledgedResponse read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(Request request, ClusterState state, ActionListener<AcknowledgedResponse> listener)
protected void clusterManagerOperation(Request request, ClusterState state, ActionListener<AcknowledgedResponse> listener)
throws Exception {
clusterService.submitStateUpdateTask(
"remove-data-stream [" + Strings.arrayToCommaDelimitedString(request.names) + "]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ protected Response read(StreamInput in) throws IOException {
}

@Override
protected void masterOperation(Request request, ClusterState state, ActionListener<Response> listener) throws Exception {
protected void clusterManagerOperation(Request request, ClusterState state, ActionListener<Response> listener) throws Exception {
List<DataStream> dataStreams = getDataStreams(state, indexNameExpressionResolver, request);
List<Response.DataStreamInfo> dataStreamInfos = new ArrayList<>(dataStreams.size());
for (DataStream dataStream : dataStreams) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ protected ClusterBlockException checkBlock(DeleteIndexRequest request, ClusterSt
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final DeleteIndexRequest request,
final ClusterState state,
final ActionListener<AcknowledgedResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected ClusterBlockException checkBlock(IndicesExistsRequest request, Cluster
}

@Override
protected void masterOperation(
protected void clusterManagerOperation(
final IndicesExistsRequest request,
final ClusterState state,
final ActionListener<IndicesExistsResponse> listener
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected GetIndexResponse read(StreamInput in) throws IOException {
}

@Override
protected void doMasterOperation(
protected void doClusterManagerOperation(
final GetIndexRequest request,
String[] concreteIndices,
final ClusterState state,
Expand Down
Loading