Namespace level offloader - #6183
Conversation
…namespace-level-offloader # Conflicts: # pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Namespaces.java # pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java
| } | ||
| } else { | ||
| LOG.info("No ledger offloader configured, using NULL instance"); | ||
| LOG.warn("No ledger offloader configured, using NULL instance"); |
There was a problem hiding this comment.
Keep log level to info, we don't need to warn users when they have not enable the offloader.
| import org.apache.pulsar.common.policies.data.OffloadPolicies; | ||
| import org.apache.pulsar.common.policies.data.OffloadPolicies; |
| } | ||
|
|
||
| private LedgerOffloader initManagedLedgerOffloader(PulsarConnectorConfig conf) { | ||
| private LedgerOffloader initManagedLedgerOffloader(PulsarConnectorConfig conf, OffloadPolicies offloadPolicies) { |
There was a problem hiding this comment.
Same as PulsarService, use initManagedLedgerOffloader(OffloadPolicies offloadPolicies). For default offloader, just convert serverConfiguration to the OffloadPolicies.
2. Add methods for interface LedgerOffloader, add the getOffloadPolicies method, add close method; 2. Unified the offload policies configuration type, use the OffloadPolicies instead of TieredStorageConfigurationData and FileSystemConfigurationData.
There was a problem hiding this comment.
Overall looks good, please help try to add some integration test to cover the changes.
I'm concern about current implementation related to namespace policy changes in Pulsar SQL.
In this PR, split manager fetches namespace policies. This will lead to more admin API requests.
@sijie @jiazhai Is there any better approach? or we need to add a flag to disable fetch namespace policy.
Pulsar SQL may have many workers, regularly fetch still not a good way.
2. modify the `get-offload` to `get-offload-policies`; 3. add the OffloadPolicies validate in NamespacesBase.
sijie
left a comment
There was a problem hiding this comment.
overall looks good.
@codelipenghui I think split manager is only run when a job is submitted. once the split is created, I don't think each split is fetching the namespace policies. so that should be fine.
|
@gaoran10 well done! |
|
@gaoran10 Please take a look sijie's comments. nice job 👍 |
@codelipenghui ok, I will fix them. |
|
@sijie Thank you! |
2. modify setOffloadPolicies api error message.
…10/pulsar into namespace-level-offloader
|
@gaoran10 Hi, thanks for the work you did there. We are missing a point that I didn't precise in original issue: |
@KannarFr Hi, thanks for your suggestions. In currently, maybe the config |
|
Yup, closed on #6283 but forget here, sorry. |
|
Add label to 2.5.1, due to #6325 dependency |
### Motivation Currently, the offload operation only have the cluster level configuration, can't set the offload configuration at the namespace level, it's inflexible. ### Modifications Add the namespace offload policies. (cherry picked from commit fd03be5)
### Motivation Currently, the offload operation only have the cluster level configuration, can't set the offload configuration at the namespace level, it's inflexible. ### Modifications Add the namespace offload policies. (cherry picked from commit fd03be5)
### Motivation Currently, the offload operation only have the cluster level configuration, can't set the offload configuration at the namespace level, it's inflexible. ### Modifications Add the namespace offload policies. (cherry picked from commit fd03be5)
### Motivation Currently, the offload operation only have the cluster level configuration, can't set the offload configuration at the namespace level, it's inflexible. ### Modifications Add the namespace offload policies.
This work was originally developed by @KannarFr at pull request #4739. This pull request was based on #4739
Fixes: #4547
Motivation
Currently, the offload operation only have the cluster level configuration, can't set the offload configuration at the namespace level, it's inflexible.
Modifications
Add the namespace offload policies.
Documentation