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

Replace non-inclusive terminology 'master' in code comments and internal variable/method/class names #2150

Closed
wants to merge 28 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
45ee23d
Replace master in NoMasterBlockService class
Feb 15, 2022
b597d96
Replace master in Coordinator class
Feb 15, 2022
e71406e
Replace master in ClusterHealthResponse class
Feb 15, 2022
541ce80
Replace master in Method withMasterTimeout()
Feb 15, 2022
7679794
Replace master in TimedRequest class
Feb 15, 2022
c80b14f
Replace master in Method get/setMasterTimeout()
Feb 15, 2022
f1a63ef
Replace master of method SetRandomMasterTimeout()
Feb 15, 2022
998e88d
Replace master in subprojects - client modules plugins qa
Feb 15, 2022
50f0de0
Replace master in TestCluster classes
Feb 16, 2022
cbc71a2
Replace master in test.framework test classes
Feb 16, 2022
9835546
Replace master terminology in classes of server directories
Feb 17, 2022
9b4719b
adjust format by spotlessApply
tlfeng Feb 17, 2022
b41fe3b
Replace master terminology in classes of server directories - leftover
tlfeng Feb 17, 2022
e2e9347
Replace master in server classes - leftover
Feb 17, 2022
1e42576
Adjust format by spotlessApply task
Feb 17, 2022
9026aed
Replace master in server test classes
Feb 17, 2022
63282ff
Merge remote-tracking branch 'upstream/main' into replace-master-inte…
Feb 17, 2022
8af6374
Adjust format by spotlessApply task
Feb 17, 2022
ce8c7e9
Adjust format by spotlessApply task
Feb 17, 2022
7e352ef
Change 'clustermanager' to 'cluster_manager' or 'cluster manager' in …
Feb 18, 2022
9d3b42f
Merge branch 'main' into replace-master-internal
Mar 7, 2022
d8b016d
Merge branch 'main' into replace-master-internal
tlfeng Mar 8, 2022
91d768c
Rename initialMasterNodes
Mar 16, 2022
4f1211c
Merge remote-tracking branch 'origin/main' into replace-master-internal
Mar 16, 2022
717bc11
Rename clusterManagerNodeNames
Mar 16, 2022
36a5bbe
Merge branch 'main' into replace-master-internal
Mar 17, 2022
0817155
Merge branch 'main' into replace-master-internal
Mar 19, 2022
3c204eb
Restore rename DISCOVERED_MASTER in ClusterHealthResponse
Mar 19, 2022
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
Replace master in TimedRequest class
Signed-off-by: Tianli Feng <[email protected]>
Tianli Feng committed Feb 15, 2022
commit 76797941b4090887af3cd1c0d8b8454ca1880219
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ public abstract class TimedRequest implements Validatable {
public static final TimeValue DEFAULT_MASTER_NODE_TIMEOUT = TimeValue.timeValueSeconds(30);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might also want to update this variable name.

Copy link
Collaborator Author

@tlfeng tlfeng Feb 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review!
I think I'm not going to rename this variable name. It's a Java API which may break the compatibility to other software that uses server package: https://opensearch.org/javadocs/1.2.4/OpenSearch/server/build/docs/javadoc/org/opensearch/action/support/master/MasterNodeRequest.html#DEFAULT_MASTER_NODE_TIMEOUT
The current plan is to replace all those names in Java API directly in version 3.0.0 .

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay! Thank you :)


private TimeValue timeout = DEFAULT_ACK_TIMEOUT;
private TimeValue masterTimeout = DEFAULT_MASTER_NODE_TIMEOUT;
private TimeValue clusterManagerTimeout = DEFAULT_MASTER_NODE_TIMEOUT;

/**
* Sets the timeout to wait for the all the nodes to acknowledge
@@ -58,11 +58,11 @@ public void setTimeout(TimeValue timeout) {
}

/**
* Sets the timeout to connect to the master node
* @param masterTimeout timeout as a {@link TimeValue}
* Sets the timeout to connect to the clustermanager node
* @param clusterManagerTimeout timeout as a {@link TimeValue}
*/
public void setMasterTimeout(TimeValue masterTimeout) {
this.masterTimeout = masterTimeout;
public void setMasterTimeout(TimeValue clusterManagerTimeout) {
this.clusterManagerTimeout = clusterManagerTimeout;
}

/**
@@ -73,9 +73,9 @@ public TimeValue timeout() {
}

/**
* Returns the timeout for the request to be completed on the master node
* Returns the timeout for the request to be completed on the clustermanager node
*/
public TimeValue masterNodeTimeout() {
return masterTimeout;
return clusterManagerTimeout;
}
}
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ public class GetIndexTemplatesRequest implements Validatable {

private final List<String> names;

private TimeValue masterNodeTimeout = TimedRequest.DEFAULT_MASTER_NODE_TIMEOUT;
private TimeValue clusterManagerNodeTimeout = TimedRequest.DEFAULT_MASTER_NODE_TIMEOUT;
private boolean local = false;

/**
@@ -84,23 +84,23 @@ public List<String> names() {
}

/**
* @return the timeout for waiting for the master node to respond
* @return the timeout for waiting for the clustermanager node to respond
*/
public TimeValue getMasterNodeTimeout() {
return masterNodeTimeout;
return clusterManagerNodeTimeout;
}

public void setMasterNodeTimeout(@Nullable TimeValue masterNodeTimeout) {
this.masterNodeTimeout = masterNodeTimeout;
public void setMasterNodeTimeout(@Nullable TimeValue clusterManagerNodeTimeout) {
this.clusterManagerNodeTimeout = clusterManagerNodeTimeout;
}

public void setMasterNodeTimeout(String masterNodeTimeout) {
final TimeValue timeValue = TimeValue.parseTimeValue(masterNodeTimeout, getClass().getSimpleName() + ".masterNodeTimeout");
public void setMasterNodeTimeout(String clusterManagerNodeTimeout) {
final TimeValue timeValue = TimeValue.parseTimeValue(clusterManagerNodeTimeout, getClass().getSimpleName() + ".masterNodeTimeout");
setMasterNodeTimeout(timeValue);
}

/**
* @return true if this request is to read from the local cluster state, rather than the master node - false otherwise
* @return true if this request is to read from the local cluster state, rather than the clustermanager node - false otherwise
*/
public boolean isLocal() {
return local;