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

[Enhancement] Admin, RocketMQAdmin, StandaloneAdmin and AbstractRmqAdmin can be more clearer. #3897

Closed
2 tasks done
pandaapo opened this issue May 10, 2023 · 0 comments · Fixed by #3898
Closed
2 tasks done
Labels
enhancement New feature or request
Milestone

Comments

@pandaapo
Copy link
Contributor

pandaapo commented May 10, 2023

Search before asking

  • I had searched in the issues and found no similar issues.

Enhancement Request

org.apache.eventmesh.api.admin.Admin
org.apache.eventmesh.storage.rocketmq.admin.RocketMQAdmin, AbstractRmqAdmin
org.apache.eventmesh.storage.standalone.admin.StandaloneAdmin

  1. AbstractRmqAdmin's field adminExt, is instantiated in the beginning, set to null at the end in every methods. So it loses the meaning as member field.
    Every calls of getAdminExt() will set member field nameServerAddr, clusterName to same value and execute some logic repetitively.

  2. AbstractRmqAdmin's code can be write in its only subclass RocketMQAdmin, then we can get more simple code structure.

  3. There are same field and methods in RocketMQAdmin and StandaloneAdmin as subclass of Admin.

Describe the solution you'd like

  1. Make adminExt be local variable. Make the creation logic of adminExt isolate.
  2. Merge AbstractRmqAdmin's code into RocketMQAdmin.
  3. Extract the shared field and method of RocketMQAdmin and StandaloneAdmin.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@pandaapo pandaapo added the enhancement New feature or request label May 10, 2023
xwm1992 pushed a commit that referenced this issue Jun 6, 2023
…in can be more clearer. (#3898)

* Modify Admin's hierarchy.

* Fix CI error.
kyooosukedn pushed a commit to kyooosukedn/eventmesh that referenced this issue Jun 6, 2023
…RmqAdmin can be more clearer. (apache#3898)

* Modify Admin's hierarchy.

* Fix CI error.
@xwm1992 xwm1992 added this to the 1.9.0 milestone Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants