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

Deprecate and Rename abstract methods from 'Master' terminology to 'ClusterManager'. #4032

Conversation

Rishikesh1159
Copy link
Member

Signed-off-by: Rishikesh1159 [email protected]

Description

This PR deprecates and renames the following abstract methods:

In class TransportMasterNodeAction -
abstract void masterOperation(Request request, ClusterState state, ActionListener listener)

In class TransportClusterInfoAction -
abstract void doMasterOperation(Request request, String[] concreteIndices, ClusterState state, ActionListener listener)

In test/framework directory:
public abstract int numDataAndMasterNodes();

Issues Resolved

Part of #3542, #3544

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.

@Rishikesh1159 Rishikesh1159 requested review from a team and reta as code owners July 28, 2022 13:56
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2022

Codecov Report

Merging #4032 (a3f46fa) into main (85bfde1) will decrease coverage by 0.07%.
The diff coverage is 74.35%.

@@             Coverage Diff              @@
##               main    #4032      +/-   ##
============================================
- Coverage     70.65%   70.57%   -0.08%     
+ Complexity    56904    56897       -7     
============================================
  Files          4579     4582       +3     
  Lines        273780   273925     +145     
  Branches      40143    40158      +15     
============================================
- Hits         193445   193336     -109     
- Misses        64119    64334     +215     
- Partials      16216    16255      +39     
Impacted Files Coverage Δ
...ation/TransportClusterAllocationExplainAction.java 59.72% <ø> (+6.94%) ⬆️
...tion/TransportAddVotingConfigExclusionsAction.java 83.33% <ø> (-4.17%) ⬇️
...on/TransportClearVotingConfigExclusionsAction.java 86.04% <ø> (-2.33%) ⬇️
...n/cluster/health/TransportClusterHealthAction.java 47.75% <ø> (ø)
...ries/cleanup/TransportCleanupRepositoryAction.java 56.86% <ø> (ø)
...tories/delete/TransportDeleteRepositoryAction.java 100.00% <ø> (ø)
...positories/get/TransportGetRepositoriesAction.java 9.37% <ø> (ø)
...repositories/put/TransportPutRepositoryAction.java 100.00% <ø> (ø)
...tories/verify/TransportVerifyRepositoryAction.java 33.33% <ø> (ø)
...cluster/reroute/TransportClusterRerouteAction.java 42.66% <ø> (ø)
... and 588 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

@tlfeng tlfeng added enhancement Enhancement or improvement to existing feature or request deprecate v3.0.0 Issues and PRs related to version 3.0.0 backport 2.x Backport to 2.x branch v2.2.0 labels Jul 28, 2022
@@ -117,13 +117,24 @@ protected TransportClusterManagerNodeAction(

protected abstract Response read(StreamInput in) throws IOException;

protected abstract void masterOperation(Request request, ClusterState state, ActionListener<Response> listener) throws Exception;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@andrross Do you think we'd better add a comment in the code to remind adding back the abstract keyword after removing the deprecated method?

Copy link
Member

Choose a reason for hiding this comment

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

Can we follow this up right after this is merged with a PR on main that removes the master methods and makes the methods abstract? If for some reason we can't do that then a comment is fine.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure we are going to remove the deprecated methods in version 3.0, which is the code in main branch, but I will write it down in to remind in issue #3542 or a new issue.

Copy link
Collaborator

@tlfeng tlfeng left a comment

Choose a reason for hiding this comment

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

😄 A small issue related to the 2 concrete methods masterOperation().

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: null ❌
  • URL: null
  • CommitID: a3f46fa

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@tlfeng tlfeng merged commit 2a1b239 into opensearch-project:main Jul 30, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 30, 2022
…lusterManager'. (#4032)

This commit deprecates and renames the following abstract methods:
```
In class TransportMasterNodeAction -
abstract void masterOperation(Request request, ClusterState state, ActionListener listener)

In class TransportClusterInfoAction -
abstract void doMasterOperation(Request request, String[] concreteIndices, ClusterState state, ActionListener listener)

In class TestCluster:
public abstract int numDataAndMasterNodes();
```

and the following concrete methods:
```
In class TransportMasterNodeAction -
void masterOperation(Task task, Request request, ClusterState state, ActionListener<Response> listener)

In class TransportClusterInfoAction -
void masterOperation(final Request request, final ClusterState state, final ActionListener<Response> listener)
```

Signed-off-by: Rishikesh1159 <[email protected]>
(cherry picked from commit 2a1b239)
tlfeng pushed a commit that referenced this pull request Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch deprecate enhancement Enhancement or improvement to existing feature or request v2.2.0 v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants