mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-23 18:20:50 +00:00
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one): New Feature Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md): Aliyun OSS Storage support.
This commit is contained in:
parent
1c0ee15038
commit
d0425016e3
@ -603,7 +603,7 @@ namespace S3
|
||||
/// Case when bucket name represented in domain name of S3 URL.
|
||||
/// E.g. (https://bucket-name.s3.Region.amazonaws.com/key)
|
||||
/// https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#virtual-hosted-style-access
|
||||
static const RE2 virtual_hosted_style_pattern(R"((.+)\.(s3|cos|obs)([.\-][a-z0-9\-.:]+))");
|
||||
static const RE2 virtual_hosted_style_pattern(R"((.+)\.(s3|cos|obs|oss)([.\-][a-z0-9\-.:]+))");
|
||||
|
||||
/// Case when bucket name and key represented in path of S3 URL.
|
||||
/// E.g. (https://s3.Region.amazonaws.com/bucket-name/key)
|
||||
@ -614,6 +614,7 @@ namespace S3
|
||||
static constexpr auto COSN = "COSN";
|
||||
static constexpr auto COS = "COS";
|
||||
static constexpr auto OBS = "OBS";
|
||||
static constexpr auto OSS = "OSS";
|
||||
|
||||
|
||||
uri = uri_;
|
||||
@ -638,7 +639,7 @@ namespace S3
|
||||
}
|
||||
|
||||
boost::to_upper(name);
|
||||
if (name != S3 && name != COS && name != OBS)
|
||||
if (name != S3 && name != COS && name != OBS && name != OSS)
|
||||
{
|
||||
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Object storage system name is unrecognized in virtual hosted style S3 URI: {}", quoteString(name));
|
||||
}
|
||||
@ -650,6 +651,10 @@ namespace S3
|
||||
{
|
||||
storage_name = OBS;
|
||||
}
|
||||
else if (name == OSS)
|
||||
{
|
||||
storage_name = OSS;
|
||||
}
|
||||
else
|
||||
{
|
||||
storage_name = COSN;
|
||||
|
Loading…
Reference in New Issue
Block a user