You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/12/15 01:58:35 UTC
[GitHub] [arrow-ballista] yahoNanJing commented on a diff in pull request #567: Support Alibaba Cloud OSS with ObjectStore
yahoNanJing commented on code in PR #567:
URL: https://github.com/apache/arrow-ballista/pull/567#discussion_r1049139211
##########
ballista/core/src/utils.rs:
##########
@@ -99,13 +99,24 @@ impl ObjectStoreProvider for FeatureBasedObjectStoreProvider {
#[cfg(feature = "s3")]
{
- if url.to_string().starts_with("s3://") {
+ if url.as_str().starts_with("s3://") {
if let Some(bucket_name) = url.host_str() {
let store = AmazonS3Builder::from_env()
.with_bucket_name(bucket_name)
.build()?;
return Ok(Arc::new(store));
}
+ // Support Alibaba Cloud OSS
+ // Use S3 compatibility mode to access Alibaba Cloud OSS
+ // The `AWS_ENDPOINT` should have bucket name included
+ } else if url.as_str().starts_with("oss://") {
+ if let Some(bucket_name) = url.host_str() {
+ let store = AmazonS3Builder::from_env()
+ .with_virtual_hosted_style_request(true)
Review Comment:
Is `virtual_hosted_style_request` always true for OSS and always false for normal S3?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org