[Issue 2688]Support set retention on topic level. - #7747
Conversation
1fdcd11 to
e224607
Compare
|
/pulsarbot run-failure-checks |
2 similar comments
|
/pulsarbot run-failure-checks |
|
/pulsarbot run-failure-checks |
|
@MarvinCai Could you please also help review this PR? |
|
/pulsarbot run-failure-checks |
e224607 to
e64936a
Compare
|
/pulsarbot run-failure-checks |
MarvinCai
left a comment
There was a problem hiding this comment.
left some minor comments
e64936a to
dbd7771
Compare
|
/pulsarbot run-failure-checks |
codelipenghui
left a comment
There was a problem hiding this comment.
Looks good to me, just left some minor comments.
fbfcdf2 to
bebd6f7
Compare
|
/pulsarbot run-failure-checks |
zhanghaou
left a comment
There was a problem hiding this comment.
Add some minor comments.
| if (topicName.isGlobal()) { | ||
| validateGlobalNamespaceOwnership(namespaceName); | ||
| } | ||
| checkTopicLevelPolicyEnable(); |
There was a problem hiding this comment.
checkTopicLevelPolicyEnable() is also called by getTopicPolicies(), so we can delete it here.
There was a problem hiding this comment.
okay, let me solve these problems
| if (topicName.isGlobal()) { | ||
| validateGlobalNamespaceOwnership(namespaceName); | ||
| } | ||
| checkTopicLevelPolicyEnable(); |
| if (topicName.isGlobal()) { | ||
| validateGlobalNamespaceOwnership(namespaceName); | ||
| } | ||
| checkTopicLevelPolicyEnable(); |
| void setRetention(String topic, RetentionPolicies retention) throws PulsarAdminException; | ||
|
|
||
| /** | ||
| * Set the retention configuration for all the topics on a topic asynchronously. |
There was a problem hiding this comment.
Need to modify this doc.
| CompletableFuture<RetentionPolicies> getRetentionAsync(String topic); | ||
|
|
||
| /** | ||
| * Remove the retention configuration for all the topics on a topic. |
There was a problem hiding this comment.
Need to modify this doc.
### Motivation Support set retention quota on topic level. Based on the system topic function. ### Modifications Support get-retention on topic level. Support set-retention on topic level. Support remove-retention on topic level.
### Motivation Support set retention quota on topic level. Based on the system topic function. ### Modifications Support get-retention on topic level. Support set-retention on topic level. Support remove-retention on topic level.
### Motivation Support set retention quota on topic level. Based on the system topic function. ### Modifications Support get-retention on topic level. Support set-retention on topic level. Support remove-retention on topic level.
### Motivation Support set retention quota on topic level. Based on the system topic function. ### Modifications Support get-retention on topic level. Support set-retention on topic level. Support remove-retention on topic level.
Not valid from 2.6.0 Thanks @gaoran10 > We introduce topic-level policies from 2.6.0, refer to apache/pulsar#4955, but I think we support retention policies at the topic level from 2.7.0, refer to apache/pulsar#7747. >Make the default value of the configuration topicLevelPoliciesEnabled as true from 2.11.0, refer to apache/pulsar#15619.
Motivation
Support set retention quota on topic level.
Based on the system topic function.
Modifications
Support get-retention on topic level.
Support set-retention on topic level.
Support remove-retention on topic level.
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesyes)Documentation
yes)docs/JavaDocs)