-
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
Deprecate package 'org.opensearch.action.support.master' #3542
Comments
…ere: opensearch-project/OpenSearch#3542 Signed-off-by: Rupanshi Sharma <rupanshi@amazon.com>
…tioned here: opensearch-project/OpenSearch#3542" This reverts commit 01dd024. Signed-off-by: Rupanshi Sharma <rupanshi@amazon.com>
* version upgrade to 2.1.0 Signed-off-by: Rupanshi Sharma <rupanshi@amazon.com> * Renames master/Master to clusterManager/ClusterManager as mentioned here: opensearch-project/OpenSearch#3542 Signed-off-by: Rupanshi Sharma <rupanshi@amazon.com> * Change XContentType.fromMediaTypeOrFormat to XContentType.fromMediaType in a test class to fix the unresolved method name error Signed-off-by: Rupanshi Sharma <rupanshi@amazon.com> * Upgrade gradle jar Signed-off-by: Rupanshi Sharma <rupanshi@amazon.com> * Revert "Renames master/Master to clusterManager/ClusterManager as mentioned here: opensearch-project/OpenSearch#3542" This reverts commit 01dd024. Signed-off-by: Rupanshi Sharma <rupanshi@amazon.com> Co-authored-by: Rupanshi Sharma <rupanshi@amazon.com>
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 <ftianli@amazon.com>
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 <ftianli@amazon.com> (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 <ftianli@amazon.com> (cherry picked from commit a7e113a)
Progress update on 07/20/2022:
The following methods have been deprecated and alternative have been created:
In class TransportMasterNodeAction -
Remaining:
The following methods are pending to be deprecated and renamed:
In class TransportClusterInfoAction -
1 Reason for class OpenSearch/client/rest-high-level/src/main/java/org/opensearch/client/ClusterClient.java Line 239 in 1510b94
I haven't got a proper solution to keep the backwards compatibility for those methods while creating and encouraging to use new alternative class AcknowledgedResponse in org.opensearch.action.support.clustermanager package.Related issue #3663 . 2 Reason for abstract method |
Progress update on 07/29/2022:
Remaining:
But they will not be deprecated and provided an alternative usage, but be renamed in a future major version directly as a breaking change. There is the reason #3663 (comment) |
As mentioned above, the 4 classes (AcknowledgedRequest, AcknowledgedRequestBuilder, AcknowledgedResponse, ShardsAcknowledgedResponse) in package |
* version upgrade to 2.1.0 Signed-off-by: Rupanshi Sharma <rupanshi@amazon.com> * Renames master/Master to clusterManager/ClusterManager as mentioned here: opensearch-project/OpenSearch#3542 Signed-off-by: Rupanshi Sharma <rupanshi@amazon.com> * Change XContentType.fromMediaTypeOrFormat to XContentType.fromMediaType in a test class to fix the unresolved method name error Signed-off-by: Rupanshi Sharma <rupanshi@amazon.com> * Upgrade gradle jar Signed-off-by: Rupanshi Sharma <rupanshi@amazon.com> * Revert "Renames master/Master to clusterManager/ClusterManager as mentioned here: opensearch-project/OpenSearch#3542" This reverts commit 01dd024. Signed-off-by: Rupanshi Sharma <rupanshi@amazon.com> Co-authored-by: Rupanshi Sharma <rupanshi@amazon.com>
Is your feature request related to a problem? Please describe.
A part of issue #1684.
To support inclusive language, the
master
terminology is going to be replaced bycluster manager
in the code base.The goal for this issue is:
org.opensearch.action.support.master
, which is the only package contains "master" in the name, and it will be removed in the next major version (3.0)org.opensearch.action.support.clustermanager
as the replacement.Describe the solution you'd like
For overall solution to replace "master" in public Java APIs: #1684 (comment)
Key points:
extend
the renamed class to maintain only one class while supporting the old class.Because there will be 2 classes as the result, one with new the name and one with the old name, and the class with new name should be the successor, only in this way can preserve the git file history in the renamed class.
In detail:
master
word withclustermanager
in the package name. This is done by the Rename refactoring feature of IntelliJ IDEA, so that both the definition and reference can be renamed.Master
withClusterManager
in the class name, using the same way as above.master
withclusterManager
in the method name, using the same way as above.master
folder back.@Deprecated
annotation and@deprecated
Javadoc tag inpackage-info.java
to mark the whole package as deprecated.For class, adding all the constructors of the super class.
For the method or variable contains inclusive name, change its implementation to call the corresponding ones in super class.
@Deprecated
annotation and@deprecated
Javadoc tag for the class and method that contains "master" in the name.Example of the 2 commits:
In branch: https://github.com/tlfeng/OpenSearch/commits/rename-master-package-preview
First step: rename - tlfeng@cdc3de4
Second step: add old usage back and deprecate: tlfeng@e484e0f
Describe alternatives you've considered
None.
Additional context
The package
org.opensearch.action.support.master
has got 15 Java classes inside.6 classes of those having "master" in the names.
8 methods and 2 variables in these classes having "master" in the names.
1 Class to be renamed:
MasterNodeOperationRequestBuilder
MasterNodeReadOperationRequestBuilder
MasterNodeReadRequest
MasterNodeRequest
TransportMasterNodeAction
TransportMasterNodeReadAction
2 Method and variable to be renamed:
In class MasterNodeRequest -
TimeValue DEFAULT_MASTER_NODE_TIMEOUT
TimeValue masterNodeTimeout
Request masterNodeTimeout(TimeValue timeout)
Request masterNodeTimeout(String timeout)
TimeValue masterNodeTimeout()
In class TransportMasterNodeAction -
void masterOperation(Request request, ClusterState state, ActionListener listener)
void masterOperation(Task task, Request request, ClusterState state, ActionListener listener)
String getMasterActionName(DiscoveryNode node)
In class TransportClusterInfoAction -
void masterOperation(final Request request, final ClusterState state, final ActionListener listener)
void doMasterOperation(Request request, String[] concreteIndices, ClusterState state, ActionListener listener)
The text was updated successfully, but these errors were encountered: