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 2022/06/02 09:08:33 UTC

[GitHub] [pulsar] ethqunzhong opened a new pull request, #15893: [tiered-storage] add s3 compatible storage provider for the offloader ###

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

   ### Motivation
   
   This PR #15710 provides a common way to offload data to storages which compatible with S3 APIs.
   I have a test on Tencent Cloud COS (a cloud storage which compatible with S3 APIs),but offload failed.
   error messages as below:
   
   ```
   a.util.concurrent.CompletionException: org.jclouds.aws.AWSResponseException: request POST https://xxxxx.ap-guangzhou.tencentcos.cn/xxxx-xx-xxxxx/a476b173-a354-480c-9ac2-a81cd11a15ae-ledger-1064936?uploads HTTP/1.1 failed with code 400, error: AWSError{requestId='xxxxxxx', requestToken='null', code='InvalidURI', message='Could not parse the specified URI.', context='{Resource=xxxxx.ap-guangzhou.tencentcos.cn, TraceId=xxxxxxxxxxx}'}
   ```
   
   because tencent cloud cos is use Virtual Hosted-Style as default for security reason and network performance, this is probably a reasonably good use way to set `PROPERTY_S3_VIRTUAL_HOST_BUCKETS=true` such as in #15860
   
   In [latest AWS S3 userguide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html),Virtual Hosted-Style is more recommended.
   
   
   
   otherwise,aliyun oss & tencent cos are compatible with S3 APIs. so we could simply this implementation. add a new Offload-Driver name "s3-compatible-storage" to offload data into all these s3-compatible-storages.
   
   ### Modifications
   
   1. set pure S3 offload provider use Virtual Hosted-Style as default
   2. simply and unify add a "s3-compatible-storage" offloader.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
   
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API: (yes / no)
     - The schema: (yes / no / don't know)
     - The default values of configurations: (yes / no)
     - The wire protocol: (yes / no)
     - The rest endpoints: (yes / no)
     - The admin cli options: (yes / no)
     - Anything that affects deployment: (yes / no / don't know)
   
   ### Documentation
   
   Check the box below or label this PR directly.
   
   Need to update docs? 
   
   - [x] `doc-required` 
     (Your PR needs to update docs and you will update later)
   
   - [ ] `doc-not-needed` 
     (Please explain why)
   
   - [ ] `doc` 
     (Your PR contains doc changes)
   
   - [ ] `doc-complete`
     (Docs have been already added)


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] ethqunzhong commented on pull request #15893: [tiered-storage] set s3 offloader use Virtual Hosted-Style as default

Posted by GitBox <gi...@apache.org>.
ethqunzhong commented on PR #15893:
URL: https://github.com/apache/pulsar/pull/15893#issuecomment-1171103613

   @hangc0276 PTAL


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] zymap commented on a diff in pull request #15893: [tiered-storage] add s3 compatible storage provider for the offloader

Posted by GitBox <gi...@apache.org>.
zymap commented on code in PR #15893:
URL: https://github.com/apache/pulsar/pull/15893#discussion_r889766997


##########
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/OffloadPoliciesImpl.java:
##########
@@ -66,7 +66,7 @@ public class OffloadPoliciesImpl implements Serializable, OffloadPolicies {
     public static final int DEFAULT_OFFLOAD_MAX_THREADS = 2;
     public static final int DEFAULT_OFFLOAD_MAX_PREFETCH_ROUNDS = 1;
     public static final ImmutableList<String> DRIVER_NAMES = ImmutableList
-            .of("S3", "aws-s3", "google-cloud-storage", "filesystem", "azureblob", "aliyun-oss");
+      .of("S3", "aws-s3", "google-cloud-storage", "filesystem", "azureblob", "s3-compatible-storage");

Review Comment:
   It's better to keep the original style, this change will break some users who already take it. 



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] ethqunzhong commented on a diff in pull request #15893: [tiered-storage] add s3 compatible storage provider for the offloader

Posted by GitBox <gi...@apache.org>.
ethqunzhong commented on code in PR #15893:
URL: https://github.com/apache/pulsar/pull/15893#discussion_r890119792


##########
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/OffloadPoliciesImpl.java:
##########
@@ -66,7 +66,7 @@ public class OffloadPoliciesImpl implements Serializable, OffloadPolicies {
     public static final int DEFAULT_OFFLOAD_MAX_THREADS = 2;
     public static final int DEFAULT_OFFLOAD_MAX_PREFETCH_ROUNDS = 1;
     public static final ImmutableList<String> DRIVER_NAMES = ImmutableList
-            .of("S3", "aws-s3", "google-cloud-storage", "filesystem", "azureblob", "aliyun-oss");
+      .of("S3", "aws-s3", "google-cloud-storage", "filesystem", "azureblob", "s3-compatible-storage");

Review Comment:
   ok. i will fix it for code compatible.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] ethqunzhong commented on pull request #15893: [tiered-storage] add s3 compatible storage provider for the offloader

Posted by GitBox <gi...@apache.org>.
ethqunzhong commented on PR #15893:
URL: https://github.com/apache/pulsar/pull/15893#issuecomment-1147419618

   > We could change all the jclouds properties by the environment variable or the properties. Adding by this https://github.com/apache/pulsar/pull/15710/files#diff-5fa8cee1e48758e8c2ace441539e0fd696aef158af2da84341532c3e492efc61R333. So the S3 should be a more general way for all the S3-compatible storage service.
   
   i think set this value true as default is more  user-friendly and recommanded from the guide of [latest AWS S3 userguide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html) says.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar] github-actions[bot] commented on pull request #15893: [tiered-storage] set s3 offloader use Virtual Hosted-Style as default

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15893:
URL: https://github.com/apache/pulsar/pull/15893#issuecomment-1200332501

   The pr had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org