-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Support set property on a namespace. #10015
Support set property on a namespace. #10015
Conversation
try { | ||
final String path = path(POLICIES, namespaceName.toString()); | ||
updatePolicies(path, (policies) -> { | ||
policies.properties.put(key, value); |
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.
Do we need to provide an option for overwriting the existing key?
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.
Overwriting the existing key is the default behavior. If we need to support prevent an update when the key exists, we can add it in the future.
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
Outdated
Show resolved
Hide resolved
/pulsarbot run-failure-checks |
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.
@codelipenghui overall looks good. but it might be worth supporting set a map of key/value pairs together instead of individual keys.
@sijie Make sense, will add an endpoint to support multiple key-values. |
Motivation
Add support for set-property/get-property/remove-property on a namespace
Modifications
bin/pulsar-admin namespaces set-property
bin/pulsar-admin namespaces get-property
bin/pulsar-admin namespaces remove-property
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
The document is generated automatically.