github-actions[bot] commented on code in PR #25434:
URL: https://github.com/apache/doris/pull/25434#discussion_r1360046918


##########
be/src/util/s3_util.cpp:
##########
@@ -181,8 +183,33 @@ std::shared_ptr<Aws::S3::S3Client> 
S3ClientFactory::create(const S3Conf& s3_conf
     return new_client;
 }
 
+std::map<std::string, std::string> convert_s3_properties_for_compatibility(
+        const std::map<std::string, std::string>& prop) {
+    const static std::map<std::string, std::string> properties_name_map = {
+            {S3_AK_V2, S3_AK},
+            {S3_SK_V2, S3_SK},
+            {S3_ENDPOINT_V2, S3_ENDPOINT},
+            {S3_REGION_V2, S3_REGION},
+            {S3_TOKEN_V2, S3_TOKEN},
+            {S3_MAX_CONN_SIZE_V2, S3_MAX_CONN_SIZE},
+            {S3_REQUEST_TIMEOUT_MS_V2, S3_REQUEST_TIMEOUT_MS},
+            {S3_CONN_TIMEOUT_MS_V2, S3_CONN_TIMEOUT_MS}};
+    std::map<std::string, std::string> converted;
+    for (const auto& entry : properties_name_map) {
+        if (prop.contains(entry.first)) {
+            converted.insert({entry.second, prop.at(entry.first)});
+        }
+        if (prop.contains(entry.second)) {
+            converted.insert({entry.second, prop.at(entry.second)});
+        }
+    }
+    return converted;
+}
+
 Status S3ClientFactory::convert_properties_to_s3_conf(
-        const std::map<std::string, std::string>& prop, const S3URI& s3_uri, 
S3Conf* s3_conf) {
+        const std::map<std::string, std::string>& origin_prop, const S3URI& 
s3_uri,

Review Comment:
   warning: method 'convert_properties_to_s3_conf' can be made static 
[readability-convert-member-functions-to-static]
   
   ```suggestion
   static Status S3ClientFactory::convert_properties_to_s3_conf(
   ```
   



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to