-
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 public or protected class that contains "master" terminology in 'server' and 'test/framework' directory #3543
Comments
Progress update on 07/19/2022:
The work is done by the following PRs: Most public methods and variables (except abstract methods) are renamed and deprecated in PR #4006. Remaining:
The following abstract methods are pending rename and deprecate:
1 Reason of the class OpenSearch/server/src/main/java/org/opensearch/cluster/service/ClusterService.java Line 221 in 388c80a
I haven't got a solution to keep the backwards compatibility of the method getMasterService() while deprecating the class MasterService and encourage using a new class ClusterManagerService .
2 Reason of the 3 classes in 3 Reason of the 2 abstract methods in the interface |
Progress update on 07/29/2022:
The PR #4051 renamed the classes, and PR #4058 added old classes back and deprecate. Remaining:
|
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:
server
andtest/framework
directories, and the deprecated classes will be removed in the next major version (3.0)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 class 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 method or variable name, using the same way as above.master
class file back.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.Describe alternatives you've considered
None.
Additional context
The regex to filter the lines with public or protected class definition contains "master" terminology:
(public|protected)(.)+(class|interface)\s(\w)*Master
Totally 11 classes, excluding the classes in the package that covered by issue #3542
7 methods and 4 variables in these classes having "master" in the names.
1 Class/Interface to be renamed:
sever:
interface LocalNodeMasterListener
final MasterNodeChangePredicate
NotMasterException
NoMasterBlockService
UnsafeBootstrapMasterCommand
MasterService
MasterNotDiscoveredException
RestMasterAction
test/framework:
FakeThreadPoolMasterService
BlockMasterServiceOnMaster
BusyMasterServiceDisruption
2 Method/variable to be renamed:
in interface
LocalNodeMasterListener
:void onMaster();
void offMaster();
In class
NoMasterBlockService
:int NO_MASTER_BLOCK_ID
ClusterBlock NO_MASTER_BLOCK_WRITES
ClusterBlock NO_MASTER_BLOCK_ALL
ClusterBlock NO_MASTER_BLOCK_METADATA_WRITES
ClusterBlock getNoMasterBlock()
In class
MasterService
:String MASTER_UPDATE_THREAD_NAME
boolean assertMasterUpdateThread()
boolean assertNotMasterUpdateThread(String reason)
In class
FakeThreadPoolMasterService
:int getFakeMasterServicePendingTaskCount()
The text was updated successfully, but these errors were encountered: