Skip to content

Commit

Permalink
Ecloud EOS Storage support
Browse files Browse the repository at this point in the history
  • Loading branch information
xleoken committed Jan 13, 2024
1 parent 6b666f2 commit e7efe96
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/IO/S3/URI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ URI::URI(const std::string & uri_)
/// 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|oss)([.\-][a-z0-9\-.:]+))");
static const RE2 virtual_hosted_style_pattern(R"((.+)\.(s3|cos|obs|oss|eos)([.\-][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)
Expand All @@ -47,6 +47,7 @@ URI::URI(const std::string & uri_)
static constexpr auto COS = "COS";
static constexpr auto OBS = "OBS";
static constexpr auto OSS = "OSS";
static constexpr auto EOS = "EOS";

uri = Poco::URI(uri_);

Expand Down Expand Up @@ -114,7 +115,7 @@ URI::URI(const std::string & uri_)
}

boost::to_upper(name);
if (name != S3 && name != COS && name != OBS && name != OSS)
if (name != S3 && name != COS && name != OBS && name != OSS && name != EOS)
throw Exception(ErrorCodes::BAD_ARGUMENTS,
"Object storage system name is unrecognized in virtual hosted style S3 URI: {}",
quoteString(name));
Expand All @@ -125,6 +126,8 @@ URI::URI(const std::string & uri_)
storage_name = OBS;
else if (name == OSS)
storage_name = OSS;
else if (name == EOS)
storage_name = EOS;
else
storage_name = COSN;
}
Expand Down

0 comments on commit e7efe96

Please sign in to comment.