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

[2.x] Deprecate public methods and variables with master term in package 'org.opensearch.action.support.master' (#3617) #3643

Merged

Conversation

tlfeng
Copy link
Collaborator

@tlfeng tlfeng commented Jun 22, 2022

Description

Backport PR #3617 / commit 60d7a09 , and PR #3644 to 2.x branch

Replace master terminology by cluster manager in the public Java APIs to support inclusive language.
The PR deal with the public method and variable in the package org.opensearch.action.support.master (which is now renamed to org.opensearch.action.support.clustermanager)

  • Rename public methods and variables with "master" name (listed below) by "cluster manager", including all the references to the methods/variables.
  • Add back the methods and variables in the old name, point them to call the method/variable in new name, and add deprecated annotation to them.

The renaming changes are done by the Rename refactoring feature of IntelliJ IDEA, so that both the definition and reference can be renamed.

Renamed and deprecated method and variable list:
In class MasterNodeOperationRequestBuilder -
final RequestBuilder setMasterNodeTimeout(TimeValue timeout)
final RequestBuilder setMasterNodeTimeout(String timeout)

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)

Issues Resolved

The last step for issue #3542

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

…rg.opensearch.action.support.master' (opensearch-project#3617)

Signed-off-by: Tianli Feng <ftianli@amazon.com>
@tlfeng tlfeng changed the title Deprecate public methods and variables with master term in package 'org.opensearch.action.support.master' (#3617) [2.x] Deprecate public methods and variables with master term in package 'org.opensearch.action.support.master' (#3617) Jun 22, 2022
@tlfeng tlfeng added enhancement Enhancement or improvement to existing feature or request backport PRs or issues specific to backporting features or enhancments deprecate v2.1.0 Issues and PRs related to version 2.1.0 labels Jun 22, 2022
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success d8d0640
Log 6201

Reports 6201

…ensearch.action.support.clustermanager'

Signed-off-by: Tianli Feng <ftianli@amazon.com>
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 4c9f2f1
Log 6204

Reports 6204

@tlfeng tlfeng marked this pull request as ready for review June 22, 2022 05:14
@tlfeng tlfeng requested review from a team and reta as code owners June 22, 2022 05:14
@tlfeng
Copy link
Collaborator Author

tlfeng commented Jun 22, 2022

@reta Thank you your time in the review!

@tlfeng tlfeng merged commit 79cabaf into opensearch-project:2.x Jun 22, 2022
@tlfeng tlfeng deleted the 2.x-deprecate-method-in-master-package branch June 22, 2022 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport PRs or issues specific to backporting features or enhancments deprecate enhancement Enhancement or improvement to existing feature or request v2.1.0 Issues and PRs related to version 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants