-
Notifications
You must be signed in to change notification settings - Fork 1.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
Rename public classes with 'Master' to 'ClusterManager' #3619
Conversation
Signed-off-by: Tianli Feng <[email protected]>
Log 6091 shows the test failure in issue #3579 |
Signed-off-by: Tianli Feng <[email protected]> # Conflicts: # server/src/internalClusterTest/java/org/opensearch/action/admin/indices/exists/IndicesExistsIT.java
Signed-off-by: Tianli Feng <[email protected]>
…eption in text Signed-off-by: Tianli Feng <[email protected]>
… class Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
Signed-off-by: Tianli Feng <[email protected]>
@@ -277,7 +277,7 @@ public void removeTimeoutListener(TimeoutClusterStateListener listener) { | |||
/** | |||
* Add a listener for on/off local node cluster-manager events | |||
*/ | |||
public void addLocalNodeMasterListener(LocalNodeMasterListener listener) { | |||
public void addLocalNodeMasterListener(LocalNodeClusterManagerListener listener) { |
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.
I think addLocalNodeMasterListener method should either be renamed as part of this PR to addLocalNodeClusterManagerListener or should be documented/added in issue #3543 in the second part of the issue.
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.
I will rename the method addLocalNodeMasterListener
in issue #3544, which is being changed in PR #3647.
In issue #3543, only the methods within the above list of classes will be renamed, and of course, in a following PR as well.
There will be 3 PRs to address #3543:
- Rename "Master" to "ClusterManager" in the classes names (this one)
- Add the classes with the old "Master" name back to keep the compatibility
- Rename and deprecate the public methods and variables in the above classes.
clusterApplierService.addLocalNodeMasterListener(listener); | ||
} | ||
|
||
public MasterService getMasterService() { | ||
return masterService; | ||
public ClusterManagerService getMasterService() { |
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.
getMasterService() should be renamed in this PR to getClusterManagerService() or this change should be documented in the parent issue #3543 under part 2
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.
@@ -77,7 +77,7 @@ public static MasterService createMasterService(ThreadPool threadPool, ClusterSt | |||
return clusterManagerService; | |||
} | |||
|
|||
public static MasterService createMasterService(ThreadPool threadPool, DiscoveryNode localNode) { | |||
public static ClusterManagerService createMasterService(ThreadPool threadPool, DiscoveryNode localNode) { |
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.
renaming of createMasterService to createClusterManagerService must be documented in parent issue #3543
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.
Thanks! I will rename it when resolving issue #3544
Hi @Poojita-Raj, thank you so much for reviewing my PR! |
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.
Thanks for linking me to the issues that will be covering these methods' renaming. LGTM!
@Poojita-Raj Thanks a again for your approval! 👍👍 |
Signed-off-by: Tianli Feng <[email protected]>
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.
Looks like there's a merge conflict and a couple PR comments that still need to be addressed but otherwise LGTM.
Signed-off-by: Tianli Feng <[email protected]> # Conflicts: # server/src/internalClusterTest/java/org/opensearch/discovery/ClusterManagerDisruptionIT.java # server/src/main/java/org/opensearch/cluster/coordination/NoClusterManagerBlockService.java
7267e52
to
fdb869d
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Replace master terminology by cluster manager in the public Java APIs to support inclusive language. The PR deal with the public class name in the repository (except for those covered in issue #3542). * Replace Master to ClusterManager for all the classes, including all the references to the classes. The next PR will be like de21446, adding back the classes in old name for backwards compatibility. List of classes that renamed in this PR: sever directory: interface LocalNodeMasterListener -> LocalNodeClusterManagerListener final class MasterNodeChangePredicate -> ClusterManagerNodeChangePredicate NotMasterException -> NotClusterManagerException NoMasterBlockService -> NoClusterManagerBlockService UnsafeBootstrapMasterCommand - UnsafeBootstrapClusterManagerCommand MasterService -> UnsafeBootstrapClusterManagerCommand MasterNotDiscoveredException -> ClusterManagerNotDiscoveredException RestMasterAction -> RestClusterManagerAction test/framework directory: FakeThreadPoolMasterService -> FakeThreadPoolClusterManagerService BlockMasterServiceOnMaster -> BlockClusterManagerServiceOnMaster BusyMasterServiceDisruption -> BusyClusterManagerServiceDisruption Signed-off-by: Tianli Feng <[email protected]> (cherry picked from commit a7e113a)
#3870) * Rename public classes with 'Master' to 'ClusterManager' (#3619) Replace master terminology by cluster manager in the public Java APIs to support inclusive language. The PR deal with the public class name in the repository (except for those covered in issue #3542). * Replace `Master` to `ClusterManager` in most of the class names (except `MasterService` class), including all the references to the classes. The next PR will be #3871, adding back the classes in old name for backwards compatibility. List of classes that renamed in this PR: `sever` directory: interface LocalNodeMasterListener -> LocalNodeClusterManagerListener final class MasterNodeChangePredicate -> ClusterManagerNodeChangePredicate NotMasterException -> NotClusterManagerException NoMasterBlockService -> NoClusterManagerBlockService UnsafeBootstrapMasterCommand - UnsafeBootstrapClusterManagerCommand MasterNotDiscoveredException -> ClusterManagerNotDiscoveredException RestMasterAction -> RestClusterManagerAction List of classes that not renamed: `sever` directory: MasterService `test/framework` directory: FakeThreadPoolMasterService BlockMasterServiceOnMaster BusyMasterServiceDisruption Signed-off-by: Tianli Feng <[email protected]> (cherry picked from commit a7e113a)
- Add back the usage of old names for some classes for backwards compatibility. Those public classes were renamed from "master" to "cluster manager" In PR #3619 / commit a7e113a. - Add a unit test to validate the backwards compatibility of interface `LocalNodeMasterListener` remains. - Revert the renaming of class `MasterService`, `FakeThreadPoolMasterService`, `BlockMasterServiceOnMaster` and `BusyMasterServiceDisruption`, as well as instance variable names of class `MasterService`. Because I couldn't solve the compatibility problem of a public method `public ClusterManagerService getMasterService()` (#3871 (comment)) **List of classes that renamed in previous PR:** In this PR, the usages of the old names should all be restored. `sever` directory: interface LocalNodeMasterListener -> LocalNodeClusterManagerListener final class MasterNodeChangePredicate -> ClusterManagerNodeChangePredicate NotMasterException -> NotClusterManagerException NoMasterBlockService -> NoClusterManagerBlockService UnsafeBootstrapMasterCommand - UnsafeBootstrapClusterManagerCommand MasterNotDiscoveredException -> ClusterManagerNotDiscoveredException RestMasterAction -> RestClusterManagerAction **List of classes that not renamed:** `sever` directory: MasterService `test/framework` directory: FakeThreadPoolMasterService BlockMasterServiceOnMaster BusyMasterServiceDisruption Signed-off-by: Tianli Feng <[email protected]>
…ect#3871) - Add back the usage of old names for some classes for backwards compatibility. Those public classes were renamed from "master" to "cluster manager" In PR opensearch-project#3619 / commit opensearch-project@a7e113a. - Add a unit test to validate the backwards compatibility of interface `LocalNodeMasterListener` remains. - Revert the renaming of class `MasterService`, `FakeThreadPoolMasterService`, `BlockMasterServiceOnMaster` and `BusyMasterServiceDisruption`, as well as instance variable names of class `MasterService`. Because I couldn't solve the compatibility problem of a public method `public ClusterManagerService getMasterService()` (opensearch-project#3871 (comment)) **List of classes that renamed in previous PR:** In this PR, the usages of the old names should all be restored. `sever` directory: interface LocalNodeMasterListener -> LocalNodeClusterManagerListener final class MasterNodeChangePredicate -> ClusterManagerNodeChangePredicate NotMasterException -> NotClusterManagerException NoMasterBlockService -> NoClusterManagerBlockService UnsafeBootstrapMasterCommand - UnsafeBootstrapClusterManagerCommand MasterNotDiscoveredException -> ClusterManagerNotDiscoveredException RestMasterAction -> RestClusterManagerAction **List of classes that not renamed:** `sever` directory: MasterService `test/framework` directory: FakeThreadPoolMasterService BlockMasterServiceOnMaster BusyMasterServiceDisruption Signed-off-by: Tianli Feng <[email protected]>
…3914) * Deprecate public class names with master terminology (#3871) - Add back the usage of old names for some classes for backwards compatibility. Those public classes were renamed from "master" to "cluster manager" In PR #3619 / commit a7e113a. - Add a unit test to validate the backwards compatibility of interface `LocalNodeMasterListener` remains. - Revert the renaming of class `MasterService`, `FakeThreadPoolMasterService`, `BlockMasterServiceOnMaster` and `BusyMasterServiceDisruption`, as well as instance variable names of class `MasterService`. Because I couldn't solve the compatibility problem of a public method `public ClusterManagerService getMasterService()` (#3871 (comment)) **List of classes that renamed in previous PR:** In this PR, the usages of the old names should all be restored. `sever` directory: interface LocalNodeMasterListener -> LocalNodeClusterManagerListener final class MasterNodeChangePredicate -> ClusterManagerNodeChangePredicate NotMasterException -> NotClusterManagerException NoMasterBlockService -> NoClusterManagerBlockService UnsafeBootstrapMasterCommand - UnsafeBootstrapClusterManagerCommand MasterNotDiscoveredException -> ClusterManagerNotDiscoveredException RestMasterAction -> RestClusterManagerAction **List of classes that not renamed:** `sever` directory: MasterService `test/framework` directory: FakeThreadPoolMasterService BlockMasterServiceOnMaster BusyMasterServiceDisruption Signed-off-by: Tianli Feng <[email protected]>
Description
Replace
master
terminology bycluster manager
in the public Java APIs to support inclusive language.The PR deal with the public class name in the repository (except for those covered in issue #3542).
Master
toClusterManager
for all the classes, including all the references to the classes.The above changes are done by the Rename refactoring feature of IntelliJ IDEA, so that both the definition and reference can be renamed.
The next PR will be like de21446, adding back the classes in old name for backwards compatibility.
List of classes that renamed in this PR:
sever
directory:interface LocalNodeMasterListener -> LocalNodeClusterManagerListener
final class MasterNodeChangePredicate -> ClusterManagerNodeChangePredicate
NotMasterException -> NotClusterManagerException
NoMasterBlockService -> NoClusterManagerBlockService
UnsafeBootstrapMasterCommand - UnsafeBootstrapClusterManagerCommand
MasterService -> ClusterManagerService
MasterNotDiscoveredException -> ClusterManagerNotDiscoveredException
RestMasterAction -> RestClusterManagerAction
test/framework
directory:FakeThreadPoolMasterService -> FakeThreadPoolClusterManagerService
BlockMasterServiceOnMaster -> BlockClusterManagerServiceOnMaster
BusyMasterServiceDisruption -> BusyClusterManagerServiceDisruption
Issues Resolved
The first step to resolve issue #3543
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.