ethqunzhong opened a new pull request, #20646:
URL: https://github.com/apache/pulsar/pull/20646

   
   ### Motivation
   The existing behavior logic of the namespaces/topics set offload-policies is 
inconsistent.
   1. The namespaces set-offload-policies does not support configuring the 
filesystem because the `bucket` options are set as `required`.
   2. cli options are different, and the behavior of supporting unit conversion 
is inconsistent. eg:
   
       For example, there are two admin API methods to configure offload policy 
for `persistent://myprop/clust/ns1/ds1`:
       a. namespaces set-offload-policies in cli commond `set-offload-policies 
myprop/clust/ns1 -d s3 -r region -b bucket -e 
       endpoint -mbs 32M -rbs 5M -oat 10M -oats 100 -oae 10s -orp 
tiered-storage-first`
   
       b. topics set-offload-policies in cli commond `set-offload-policies 
persistent://myprop/clust/ns1/ds1 -d s3 -r region -b 
       bucket -e endpoint -m 33554432 -rb 5242880 -t 10485760 -ts 100 -dl 10000 
-orp tiered-storage-first`
   
       The command has the same effect, but their command options are different 
and whether they recognize parameter units 
       is also different. **This can easily confuse users**.
   
   ### Modifications
   1. Remove unnecessary condition `bucket` `required=true` in 
namespace#set-offload-policies.
   2. Compatible options for namespace/topic and standardized support for unit 
recognition
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   This change is already covered by supplementary unit-test.
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [x] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository:  https://github.com/ethqunzhong/pulsar/pull/7


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to