dclim commented on a change in pull request #7907: #7875: Setting ACL on S3 
task logs on similar lines as that of data segments pushed to S3
URL: https://github.com/apache/incubator-druid/pull/7907#discussion_r295900450
 
 

 ##########
 File path: 
extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3Utils.java
 ##########
 @@ -242,4 +246,23 @@ public static S3ObjectSummary 
getSingleObjectSummary(ServerSideEncryptingAmazonS
 
     return objectSummary;
   }
+
+  /**
+   * Uploads a file to S3 if possible. First trying to set ACL to give the 
bucket owner full control of the file before uploading.
+   *
+   * @param service S3 client
+   * @param disableAcl true if ACL shouldn't be set for the file
+   * @param key The key under which to store the new object.
+   * @param file The path of the file to upload to Amazon S3.
+   */
+  public static void uploadFileIfPossible(ServerSideEncryptingAmazonS3 
service, boolean disableAcl, String bucket, String key, File file)
+  {
+    final PutObjectRequest logFilePutRequest = new PutObjectRequest(bucket, 
key, file);
 
 Review comment:
   This isn't strictly just for log files anymore, so how about naming this 
something more generic - even just `putObjectRequest`?

----------------------------------------------------------------
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