You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/12/18 08:10:10 UTC

[GitHub] [pulsar] Renkai commented on a change in pull request #8985: [Issue 8887][tiered-storage-jcloud] support tiered-storage provider by aliyun OSS

Renkai commented on a change in pull request #8985:
URL: https://github.com/apache/pulsar/pull/8985#discussion_r545636617



##########
File path: tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/JCloudBlobStoreProvider.java
##########
@@ -162,6 +165,48 @@ public void buildCredentials(TieredStorageConfiguration config) {
         }
     },
 
+
+    /**
+     * Aliyun OSS is compatible with the S3 API
+     * https://www.alibabacloud.com/help/doc-detail/64919.htm
+     */
+    ALIYUN_OSS("aliyun-oss", new AnonymousProviderMetadata(new S3ApiMetadata(), "")) {
+        @Override
+        public void validate(TieredStorageConfiguration config) throws IllegalArgumentException {
+            VALIDATION.validate(config);
+        }
+
+        @Override
+        public BlobStore getBlobStore(TieredStorageConfiguration config) {
+            ContextBuilder contextBuilder = ContextBuilder.newBuilder(config.getProviderMetadata());

Review comment:
       I think it's better to define a new constant like here https://github.com/apache/pulsar/blob/bf9f61969c3fd7d82b85502266a12f85a793c63a/tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/provider/JCloudBlobStoreProvider.java#L258




----------------------------------------------------------------
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:
users@infra.apache.org