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

[Backport 2.x] Rename public classes with 'Master' to 'ClusterManager' #3870

Merged
merged 6 commits into from
Jul 14, 2022
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
Prev Previous commit
Next Next commit
Restore some classpath that removed during renaming refactor
Signed-off-by: Tianli Feng <ftianli@amazon.com>
  • Loading branch information
Tianli Feng committed Jul 12, 2022
commit c864668a5442aaa2d247ea56b1b6933b291ab796
13 changes: 8 additions & 5 deletions server/src/main/java/org/opensearch/OpenSearchException.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
package org.opensearch;

import org.opensearch.action.support.replication.ReplicationOperation;
import org.opensearch.cluster.NotClusterManagerException;
import org.opensearch.cluster.action.shard.ShardStateAction;
import org.opensearch.common.CheckedFunction;
import org.opensearch.common.Nullable;
Expand All @@ -47,7 +46,6 @@
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.common.xcontent.XContentParseException;
import org.opensearch.common.xcontent.XContentParser;
import org.opensearch.discovery.ClusterManagerNotDiscoveredException;
import org.opensearch.index.Index;
import org.opensearch.index.shard.ShardId;
import org.opensearch.rest.RestStatus;
Expand Down Expand Up @@ -790,8 +788,8 @@ private enum OpenSearchExceptionHandle {
UNKNOWN_VERSION_ADDED
),
CLUSTER_MANAGER_NOT_DISCOVERED_EXCEPTION(
ClusterManagerNotDiscoveredException.class,
ClusterManagerNotDiscoveredException::new,
org.opensearch.discovery.ClusterManagerNotDiscoveredException.class,
org.opensearch.discovery.ClusterManagerNotDiscoveredException::new,
3,
UNKNOWN_VERSION_ADDED
),
Expand Down Expand Up @@ -1500,7 +1498,12 @@ private enum OpenSearchExceptionHandle {
143,
UNKNOWN_VERSION_ADDED
),
NOT_CLUSTER_MANAGER_EXCEPTION(NotClusterManagerException.class, NotClusterManagerException::new, 144, UNKNOWN_VERSION_ADDED),
NOT_CLUSTER_MANAGER_EXCEPTION(
org.opensearch.cluster.NotMasterException.class,
org.opensearch.cluster.NotMasterException::new,
144,
UNKNOWN_VERSION_ADDED
),
STATUS_EXCEPTION(
org.opensearch.OpenSearchStatusException.class,
org.opensearch.OpenSearchStatusException::new,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ public void onNoLongerMaster(String source) {
"stopped being cluster-manager while waiting for events with priority [{}]. retrying.",
request.waitForEvents()
);
// TransportClusterManagerNodeAction implements the retry logic, which is triggered by passing a
// NotClusterManagerException
// TransportClusterManagerNodeAction implements the retry logic,
// which is triggered by passing a NotClusterManagerException
listener.onFailure(new NotClusterManagerException("no longer cluster-manager. source: [" + source + "]"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ public class JoinHelper {
@Override
public ClusterTasksResult<JoinTaskExecutor.Task> execute(ClusterState currentState, List<JoinTaskExecutor.Task> joiningTasks)
throws Exception {
// The current state that ClusterManagerService uses might have been updated by a (different) cluster-manager in a higher
// term
// already
// The current state that ClusterManagerService uses might have been updated by a (different) cluster-manager
// in a higher term already
// Stop processing the current cluster state update, as there's no point in continuing to compute it as
// it will later be rejected by Coordinator.publish(...) anyhow
if (currentState.term() > term) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import org.opensearch.action.search.ShardSearchFailure;
import org.opensearch.action.support.replication.ReplicationOperation;
import org.opensearch.client.AbstractClientHeadersTestCase;
import org.opensearch.cluster.NotClusterManagerException;
import org.opensearch.cluster.action.shard.ShardStateAction;
import org.opensearch.cluster.block.ClusterBlockException;
import org.opensearch.cluster.coordination.CoordinationStateRejectedException;
Expand All @@ -70,7 +69,6 @@
import org.opensearch.common.util.CancellableThreadsTests;
import org.opensearch.common.util.set.Sets;
import org.opensearch.common.xcontent.XContentLocation;
import org.opensearch.discovery.ClusterManagerNotDiscoveredException;
import org.opensearch.env.ShardLockObtainFailedException;
import org.opensearch.index.Index;
import org.opensearch.index.engine.RecoveryEngineException;
Expand Down Expand Up @@ -696,7 +694,7 @@ public void testIds() {
ids.put(0, org.opensearch.index.snapshots.IndexShardSnapshotFailedException.class);
ids.put(1, org.opensearch.search.dfs.DfsPhaseExecutionException.class);
ids.put(2, org.opensearch.common.util.CancellableThreads.ExecutionCancelledException.class);
ids.put(3, ClusterManagerNotDiscoveredException.class);
ids.put(3, org.opensearch.discovery.ClusterManagerNotDiscoveredException.class);
ids.put(4, org.opensearch.OpenSearchSecurityException.class);
ids.put(5, org.opensearch.index.snapshots.IndexShardRestoreException.class);
ids.put(6, org.opensearch.indices.IndexClosedException.class);
Expand Down Expand Up @@ -834,7 +832,7 @@ public void testIds() {
ids.put(141, org.opensearch.index.query.QueryShardException.class);
ids.put(142, ShardStateAction.NoLongerPrimaryShardException.class);
ids.put(143, org.opensearch.script.ScriptException.class);
ids.put(144, NotClusterManagerException.class);
ids.put(144, org.opensearch.cluster.NotClusterManagerException.class);
ids.put(145, org.opensearch.OpenSearchStatusException.class);
ids.put(146, org.opensearch.tasks.TaskCancelledException.class);
ids.put(147, org.opensearch.env.ShardLockObtainFailedException.class);
Expand Down