gaoran10 commented on a change in pull request #6335: Refactored JCloud Tiered
Storage
URL: https://github.com/apache/pulsar/pull/6335#discussion_r407178941
##########
File path:
tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/JCloudLedgerOffloaderFactory.java
##########
@@ -38,13 +40,14 @@ public static JCloudLedgerOffloaderFactory of() {
@Override
public boolean isDriverSupported(String driverName) {
- return BlobStoreManagedLedgerOffloader.driverSupported(driverName);
+ return JCloudBlobStoreProvider.driverSupported(driverName);
}
@Override
- public BlobStoreManagedLedgerOffloader create(OffloadPolicies
offloadPolicies,
- Map<String, String>
userMetadata,
- OrderedScheduler scheduler)
throws IOException {
- return BlobStoreManagedLedgerOffloader.create(offloadPolicies,
userMetadata, scheduler);
+ public BlobStoreManagedLedgerOffloader create(OffloadPolicies
offloadPolicies, Map<String, String> userMetadata,
+ OrderedScheduler scheduler) throws IOException {
+
+ TieredStorageConfiguration config =
TieredStorageConfiguration.create(userMetadata);
+ return BlobStoreManagedLedgerOffloader.create(config, userMetadata,
scheduler);
Review comment:
Currently, the Pulsar support independent offload policy for each namespace,
the `userMetadata` param contains the global offload configs and the
`offloadPolicies` param contains the Namespace level offload configs. If the
namespace has its own offload policy, we should use the independent offload
policy, otherwise, we should use the global offload policy.
The `OffloadPolicies` has independent config for S3 and GCS, such as
`s3ManagedLedgerOffloadRegion` and `gcsManagedLedgerOffloadRegion`, follow your
way, we could combine them as the `region`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services