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: [email protected]

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

Reply via email to