jihoonson commented on a change in pull request #9375: Add support for optional 
aws credentials for s3 for ingestion
URL: https://github.com/apache/druid/pull/9375#discussion_r384027725
 
 

 ##########
 File path: 
extensions-core/s3-extensions/src/main/java/org/apache/druid/data/input/s3/S3InputSource.java
 ##########
 @@ -42,32 +46,66 @@
 import java.net.URI;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Objects;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 public class S3InputSource extends CloudObjectInputSource
 {
-  private final ServerSideEncryptingAmazonS3 s3Client;
+  // We lazily initialize ServerSideEncryptingAmazonS3 to avoid costly s3 
operation when we only need S3InputSource
+  // for stored information (such as for task logs) and not for ingestion.
+  // (This cost only applies for new ServerSideEncryptingAmazonS3 created with 
s3InputSourceProperties given).
+  private final Supplier<ServerSideEncryptingAmazonS3> s3ClientSupplier;
+  @JsonProperty("properties")
+  private final S3InputSourceProperties s3InputSourceProperties;
   private final S3InputDataConfig inputDataConfig;
 
   @JsonCreator
   public S3InputSource(
       @JacksonInject ServerSideEncryptingAmazonS3 s3Client,
 
 Review comment:
   Do we still need this `s3Client` parameter to reuse the singleton client? If 
so, please leave a comment about it.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to