Skip to content

Commit

Permalink
[Enhancement] Decoupling read and write for BypassLoad SDK.
Browse files Browse the repository at this point in the history
Signed-off-by: jukejian <[email protected]>
Signed-off-by: plotor <[email protected]>
  • Loading branch information
plotor committed Sep 19, 2024
1 parent 41291a2 commit fc747df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion be/src/fs/fs_s3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ void S3ClientFactory::close() {
// clang-format: off
static const std::vector<Aws::String> retryable_errors = {
// tos qps limit ExceptionName
"ExceedAccountQPSLimit", "ExceedAccountRateLimit", "ExceedBucketQPSLimit", "ExceedBucketRateLimit"};
"ExceedAccountQPSLimit", "ExceedAccountRateLimit", "ExceedBucketQPSLimit", "ExceedBucketRateLimit"
};
// clang-format: on

S3ClientFactory::S3ClientPtr S3ClientFactory::new_client(const TCloudConfiguration& t_cloud_configuration,
Expand Down Expand Up @@ -323,6 +324,7 @@ S3ClientFactory::S3ClientPtr S3ClientFactory::new_client(const ClientConfigurati
secret_access_key = config::object_storage_secret_access_key;
}
}

if (!access_key_id.empty() && !secret_access_key.empty()) {
auto credentials = std::make_shared<Aws::Auth::SimpleAWSCredentialsProvider>(access_key_id, secret_access_key);
client = std::make_shared<Aws::S3::S3Client>(credentials, config,
Expand Down
1 change: 1 addition & 0 deletions be/test/fs/fs_s3_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ TEST_F(S3FileSystemTest, test_params) {
{"fs.s3a.endpoint.region", "xxx"},
{"fs.s3a.connection.ssl.enabled", "xxx"}};
std::unique_ptr<FSOptions> fs_options = std::make_unique<FSOptions>(params);
ASSERT_TRUE(nullptr == fs_options->hdfs_properties());
auto client = S3ClientFactory::instance().new_client_TEST(S3ClientFactory::getClientConfig(), *fs_options);
ASSERT_TRUE(client != nullptr);
std::unique_ptr<FileSystem> fs = new_fs_s3(*fs_options);
Expand Down

0 comments on commit fc747df

Please sign in to comment.