This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new 38d38d2906 [branch1.2](s3)add s3 properties check for 1.2 (#19732)
38d38d2906 is described below

commit 38d38d29065a001b7dca4aebac3bfb939c1f1f1b
Author: slothever <18522955+w...@users.noreply.github.com>
AuthorDate: Wed May 17 11:41:14 2023 +0800

    [branch1.2](s3)add s3 properties check for 1.2 (#19732)
    
    add s3 properties checkout to avoid NPE.
---
 fe/fe-core/src/main/java/org/apache/doris/backup/S3Storage.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/backup/S3Storage.java 
b/fe/fe-core/src/main/java/org/apache/doris/backup/S3Storage.java
index d0828ca87e..a1e42a0d90 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/backup/S3Storage.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/backup/S3Storage.java
@@ -95,6 +95,12 @@ public class S3Storage extends BlobStorage {
     public void setProperties(Map<String, String> properties) {
         super.setProperties(properties);
         caseInsensitiveProperties.putAll(properties);
+        try {
+            checkS3(caseInsensitiveProperties);
+        } catch (UserException e) {
+            String msg = e.getMessage() + " Make sure you view the correct 
version of documentation.";
+            throw new IllegalArgumentException(msg, e);
+        }
         // Virtual hosted-style is recommended in the s3 protocol.
         // The path-style has been abandoned, but for some unexplainable 
reasons,
         // the s3 client will determine whether the endpiont starts with `s3`


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

Reply via email to