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

[PIP-82] [pulsar-broker] CRUD support for ResourceGroup #10218

Merged
merged 3 commits into from
Apr 18, 2021

Conversation

ravi-vaidyanathan
Copy link
Contributor

Motivation

PIP-82 adds support for distributed resource quota enforcement at a tenant, namespace or topic level.

Modifications

  • Add REST endpoints for crud operations on ResourceGroup
  • Add REST endpoints for setting/removing ResourceGroup on namespaces.
  • Add pulsar-admin cli support for crud operations on ResourceGroup
  • Add pulsar-admin cli support for setting/removing ResourceGroup on namespace.

Verifying this change

  • Added unit tests.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • The public API: yes
  • The admin cli options: yes

Documentation

  • Does this pull request introduce a new feature? yes
  • The documentation of the same will be added in a subsequent PR

@ravi-vaidyanathan
Copy link
Contributor Author

/pulsarbot run-failure-checks

4 similar comments
@ravi-vaidyanathan
Copy link
Contributor Author

/pulsarbot run-failure-checks

@ravi-vaidyanathan
Copy link
Contributor Author

/pulsarbot run-failure-checks

@ravi-vaidyanathan
Copy link
Contributor Author

/pulsarbot run-failure-checks

@ravi-vaidyanathan
Copy link
Contributor Author

/pulsarbot run-failure-checks

@ravi-vaidyanathan
Copy link
Contributor Author

@merlimat Could you take a look at this PR when you get a chance, in the meantime i will continue to try re-running the tests to get a pass. Thanks.

@ravi-vaidyanathan
Copy link
Contributor Author

/pulsarbot run-failure-checks

@@ -101,6 +104,13 @@ public Policies deserialize(String path, byte[] content) throws Exception {
}
};

this.resourcegroupsCache = new ZooKeeperDataCache<ResourceGroup>(cache) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're moving towards having all accesses through the metadata store API, is there a way to avoid this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this, removed it.


import java.util.Objects;

public class ResourceGroup {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use @Data annotation from Lombok to automatically generate the constructors, hashcode, equals and toString methods. (and mark the fields as private)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done,

@merlimat merlimat added the type/feature The PR added a new feature or issue requested a new feature label Apr 16, 2021
@merlimat merlimat added this to the 2.8.0 milestone Apr 16, 2021
@merlimat merlimat merged commit 86e89ac into apache:master Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature The PR added a new feature or issue requested a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants