-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Make client-admin-api to use interfaces with builders instead of POJOs #10818
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
Make client-admin-api to use interfaces with builders instead of POJOs #10818
Conversation
f7421f5 to
9d0172d
Compare
|
Hi @merlimat thanks for your contribution. For this PR, do we need to update docs? |
9d0172d to
4ea3d37
Compare
|
/pulsarbot run-failure-checks |
|
/pulsarbot run-failure-checks |
| } | ||
|
|
||
| static Builder builder() { | ||
| return ReflectionUtils.newBuilder("org.apache.pulsar.common.policies.data.TenantInfoImpl"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether should we put rg.apache.pulsar.common.policies.data.TenantInfoImpl into pulsar-client-admin-api module instead of pulsar-common?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for it is the presence of Swagger annotations which cannot be put as dependency of the pulsar-client-admin-api module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make sure to use pulsar-client-admin-api dependent project must include pulsar-common dependency. Otherwise, it will throw no such class exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. You won't use pulsar-client-admin-api directly, but through pulsar-client-admin which is a shaded package, or in the context of functions, the -api module will be exposed to the function while the pulsar-client-admin will be kept in the framework class loader.
### Motivation apache/pulsar#10818 and apache/pulsar#10774 introduced API changes to `ClusterDataImpl` and `TenantInfoImpl`. ### Modifications - Fix current code for new interface. - Remove unused setup code.
apache#10818) ### Motivation Instead of using POJOs types in the Java client-admin API, use interfaces ### Modifications * Converted more POJOs into interfaces * Added builders to construct instances of the interfaces without directly using the implementation classes Note: for easier reviewing, there are 2 commits in this PR: * apache@f14ce73 includes the changes to production code * apache@23b6f74 changes to the unit tests
apache#10818) ### Motivation Instead of using POJOs types in the Java client-admin API, use interfaces ### Modifications * Converted more POJOs into interfaces * Added builders to construct instances of the interfaces without directly using the implementation classes Note: for easier reviewing, there are 2 commits in this PR: * apache@f14ce73 includes the changes to production code * apache@23b6f74 changes to the unit tests
Motivation
Instead of using POJOs types in the Java client-admin API, use interfaces
Modifications
Note: for easier reviewing, there are 2 commits in this PR: