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

[ISSUE #6644] Add admin client future interface #6646

Merged
merged 4 commits into from
Apr 28, 2023

Conversation

drpmma
Copy link
Contributor

@drpmma drpmma commented Apr 25, 2023

What is the purpose of the change

close #6644

Brief changelog

Add future interface for admin methods

@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2023

Codecov Report

Merging #6646 (ead0c57) into develop (652f5bb) will increase coverage by 42.97%.
The diff coverage is 5.66%.

@@              Coverage Diff               @@
##             develop    #6646       +/-   ##
==============================================
+ Coverage           0   42.97%   +42.97%     
- Complexity         0     8999     +8999     
==============================================
  Files              0     1109     +1109     
  Lines              0    78543    +78543     
  Branches           0    10215    +10215     
==============================================
+ Hits               0    33755    +33755     
- Misses             0    40560    +40560     
- Partials           0     4228     +4228     
Impacted Files Coverage Δ
.../rocketmq/client/impl/admin/MqClientAdminImpl.java 0.00% <0.00%> (ø)
...ocketmq/proxy/service/mqclient/MQClientAPIExt.java 37.74% <33.33%> (ø)
...a/org/apache/rocketmq/remoting/RemotingClient.java 86.66% <86.66%> (ø)

... and 1106 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

import org.apache.rocketmq.remoting.protocol.heartbeat.SubscriptionData;
import org.apache.rocketmq.remoting.protocol.subscription.SubscriptionGroupConfig;

public class MqClientAdminImpl {
Copy link
Contributor

Choose a reason for hiding this comment

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

For keep admin tools code clean, you could:

  • add async interface method in MQAdminExt and move DefaultMQAdminExtImpl async method to DefaultMQAdminExtImpl
  • refactor DefaultMQAdminExtImpl blocking method based on async method

Copy link
Contributor Author

@drpmma drpmma Apr 26, 2023

Choose a reason for hiding this comment

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

DefaultMQAdminExtImpl is the upper level of MqClientAdminImpl, in fact, the corresponding class to MqClientAdminImpl is MQClientAPIImpl which is almost all sync admin methods.

However, this class is about 3000 lines, and it's too long to add new methods, so I think composition is a good idea.

For interface, It's reasonable to add an interface for this async admin

Copy link
Contributor

@lollipopjin lollipopjin left a comment

Choose a reason for hiding this comment

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

LGTM

@drpmma drpmma merged commit 23a8ed4 into apache:develop Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add admin client future interface
4 participants